Use Node.js v20 (#437) #2
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: tests | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
workflow_dispatch: | |
jobs: | |
run-tests: | |
runs-on: ubuntu-latest | |
services: | |
db: | |
image: postgres:10.13 | |
ports: | |
- 5432:5432 | |
env: | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: password | |
POSTGRES_DB: doctors_test | |
env: | |
RAILS_ENV: test | |
DATABASE_URL: postgres://postgres:password@localhost:5432/doctors_test | |
TZ: America/Mexico_City | |
steps: | |
- name: Checkout π | |
uses: actions/checkout@v4 | |
- name: Setup Node.js π | |
uses: actions/setup-node@v2 | |
with: | |
node-version: 20 | |
- name: Install Node.js β¨ | |
run: npm install | |
- name: Install Ruby β¦ | |
uses: ruby/setup-ruby@v1 | |
with: | |
bundler-cache: true | |
- name: Run linter π | |
run: bundle exec standardrb | |
- name: Setup database π | |
run: bin/rails db:schema:load | |
- name: Run test suite π | |
run: bin/rake | |
- name: Publish code coverage π | |
uses: paambaati/[email protected] | |
env: | |
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }} | |
with: | |
coverageLocation: ${{github.workspace}}/coverage/coverage.json:simplecov | |
debug: true |