This repository has been archived by the owner on Mar 6, 2024. It is now read-only.
Merge branch 'main' into dcc/lh-decideix-202304 #199
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: Rails test | |
on: [ push ] | |
env: | |
RAILS_ENV: test | |
permissions: | |
contents: read | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
environment: ci | |
strategy: | |
matrix: | |
ruby-version: ['3.2.0'] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ matrix.ruby-version }} | |
bundler-cache: true | |
- name: Create development_secret.txt | |
env: | |
SECRET_KEY_BASE: ${{ secrets.SECRET_KEY_BASE }} | |
run: | | |
touch tmp/development_secret.txt | |
echo -n $SECRET_KEY_BASE > tmp/development_secret.txt | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
cache: 'yarn' | |
- name: Install Node.js dependencies | |
run: yarn install --prefer-offline --frozen-lockfile --immutable | |
- name: Precompile assets | |
run: bundle exec rake assets:precompile | |
- name: Run tests | |
run: bundle exec rails test | |
- name: Upload coverage | |
uses: coverallsapp/github-action@1.1.3 | |
with: | |
github-token: ${{ github.token }} |