[go: nahoru, domu]

Skip to content

Update CI

Update CI #236

Workflow file for this run

name: Test
on: [push]
jobs:
test:
env:
RAILS_ENV: "test"
TEST_DATABASE_URL: "postgresql://unipept:unipept@127.0.0.1:5432/unipept_test"
runs-on: ubuntu-latest
services:
psql:
image: postgres:16.2
env:
POSTGRES_DB: "unipept_test"
POSTGRES_PASSWORD: "unipept"
POSTGRES_USER: "unipept"
ports:
- 5432:5432
options: --health-cmd "pg_isready" --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- uses: actions/checkout@v4
- name: Use ruby from .ruby-version
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: Run tests
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
run: |
bundle exec rails db:test:prepare
bundle exec rails test
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}