name: Lint on: push: branches: - master pull_request: branches: - master env: CREATE_ADMIN: true ADMIN_EMAIL: admin@localhost ADMIN_USERNAME: admin ADMIN_PASSWORD: admin MAILER_URI: smtp://localhost:1025 jobs: run-linters: name: Run linters runs-on: ubuntu-latest steps: - name: Check out Git repository uses: actions/checkout@v2 - name: Set up Node.js uses: actions/setup-node@v1 with: node-version: 16 # ESLint and Prettier must be in `package.json` - name: Install Node.js dependencies run: yarn install --frozen-lockfile --silent - name: Lint uses: reviewdog/action-eslint@v1 with: reporter: github-pr-review # Change reporter. eslint_flags: '{src,test}/**/*.ts' - name: Typecheck uses: andoshin11/typescript-error-reporter-action@v1.0.2 run-migrations: name: Run Migrations runs-on: ubuntu-latest services: maria: image: mariadb env: MYSQL_ROOT_PASSWORD: root MYSQL_DATABASE: ohmyform options: >- --health-cmd "mysqladmin ping" --health-interval 10s --health-timeout 5s --health-retries 5 postgres: image: postgres:10-alpine env: POSTGRES_USER: root POSTGRES_PASSWORD: root POSTGRES_DB: ohmyform options: >- --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 steps: - name: Check out Git repository uses: actions/checkout@v2 - name: Set up Node.js uses: actions/setup-node@v1 with: node-version: 16 - name: Install Node.js dependencies run: yarn install --frozen-lockfile --silent - name: PostgreSQL Migrations run: yarn typeorm:postgres migration:run env: DATABASE_DRIVER: postgres DATABASE_URL: postgresql://root@127.0.0.1:5432/ohmyform - name: MariaDB Migrations run: yarn typeorm:mariadb migration:run env: DATABASE_DRIVER: mariadb DATABASE_URL: mysql://root@127.0.0.1:3306/ohmyform - name: SQLite Migrations run: yarn typeorm:sqlite migration:run env: DATABASE_DRIVER: sqlite DATABASE_URL: sqlite://data.sqlite