-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (41 loc) · 1.09 KB
/
rails-test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
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.3.6' ]
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@v4
with:
node-version: latest
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@v2
with:
github-token: ${{ github.token }}