chore: Migrate from Drone CI to GitHub Actions #3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Pull Request | |
on: | |
pull_request: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
services: | |
database: | |
image: postgres:latest | |
env: | |
POSTGRES_DB: demo | |
POSTGRES_PASSWORD: postgres | |
POSTGRES_USER: postgres | |
ports: | |
- 5432:5432 | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 'lts/*' | |
cache: 'yarn' | |
- name: Install dependencies | |
run: yarn install --frozen-lockfile | |
- name: Build | |
run: yarn build | |
- name: Lint | |
run: yarn quality:lint | |
- name: Check circular dependencies | |
run: yarn quality:circular-deps | |
- name: Unit tests | |
run: yarn quality:test | |
- name: E2E tests | |
uses: cypress-io/github-action@v6 | |
env: | |
DATABASE_HOST: database | |
DATABASE_PORT: 5432 | |
DATABASE_NAME: demo | |
DATABASE_USER: postgres | |
DATABASE_PASSWORD: postgres | |
IS_TEST: 1 | |
with: | |
command: yarn quality:e2e:ci | |
install: false |