Merge branch 'main' of https://github.com/seq-code/registry #15
This file contains hidden or 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: Tests | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| services: | |
| postgres: | |
| image: postgres:16 | |
| env: | |
| POSTGRES_DB: registry_test | |
| POSTGRES_USER: registry_test | |
| POSTGRES_PASSWORD: registry_test | |
| ports: | |
| - 5432:5432 | |
| options: >- | |
| --health-cmd "pg_isready -U registry_test -d registry_test" | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| env: | |
| RAILS_ENV: test | |
| PGHOST: localhost | |
| PGPORT: 5432 | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Set up Ruby | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| bundler-cache: true | |
| - name: Set up Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| cache: yarn | |
| - name: Install JavaScript dependencies | |
| run: yarn install --frozen-lockfile | |
| - name: Prepare database | |
| run: bin/rails db:prepare | |
| - name: Run tests | |
| run: bin/rails test:all |