Skip to content

Commit 8952c25

Browse files
committed
Try an apt-get update first
1 parent 870af35 commit 8952c25

File tree

1 file changed

+42
-42
lines changed

1 file changed

+42
-42
lines changed

.github/workflows/ruby.yml

Lines changed: 42 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@ name: Ruby
22

33
on:
44
push:
5-
branches: [ main ]
5+
branches: [main]
66
pull_request:
7-
branches: [ main ]
8-
7+
branches: [main]
8+
99
jobs:
1010
test:
1111
runs-on: ubuntu-latest
1212
strategy:
1313
matrix:
14-
ruby-version: ['3.4']
15-
14+
ruby-version: ["3.4"]
15+
1616
services:
1717
postgres:
1818
image: postgres:latest
@@ -27,42 +27,42 @@ jobs:
2727
--health-interval 10s
2828
--health-timeout 5s
2929
--health-retries 5
30-
30+
3131
steps:
32-
- uses: actions/checkout@v4
33-
34-
- name: Install libvips
35-
run: sudo apt-get install -y libvips
36-
37-
- name: Set up Ruby
38-
uses: ruby/setup-ruby@v1
39-
with:
40-
ruby-version: ${{matrix.ruby-version}}
41-
bundler-cache: true
32+
- uses: actions/checkout@v4
33+
34+
- name: Install libvips
35+
run: sudo apt-get update && sudo apt-get install -y libvips
36+
37+
- name: Set up Ruby
38+
uses: ruby/setup-ruby@v1
39+
with:
40+
ruby-version: ${{matrix.ruby-version}}
41+
bundler-cache: true
42+
43+
- name: Setup Code Climate test-reporter
44+
run: |
45+
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
46+
chmod +x ./cc-test-reporter
47+
./cc-test-reporter before-build
4248
43-
- name: Setup Code Climate test-reporter
44-
run: |
45-
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
46-
chmod +x ./cc-test-reporter
47-
./cc-test-reporter before-build
48-
49-
- name: Create DB
50-
env:
51-
RAILS_ENV: test
52-
run: |
53-
cp test/dummy/config/database.yml.ci test/dummy/config/database.yml
54-
bin/rails db:setup
55-
56-
- name: Compile assets
57-
env:
58-
RAILS_ENV: test
59-
run: bin/rails app:assets:precompile
60-
61-
- name: Run tests
62-
run: bin/rails test test/*
63-
64-
- name: Publish Code Coverage
65-
env:
66-
GIT_BRANCH: ${GITHUB_REF/refs\/heads\//}
67-
run: ./cc-test-reporter after-build -r ${{ secrets.CodeClimate }}
68-
if: github.ref == 'refs/heads/main'
49+
- name: Create DB
50+
env:
51+
RAILS_ENV: test
52+
run: |
53+
cp test/dummy/config/database.yml.ci test/dummy/config/database.yml
54+
bin/rails db:setup
55+
56+
- name: Compile assets
57+
env:
58+
RAILS_ENV: test
59+
run: bin/rails app:assets:precompile
60+
61+
- name: Run tests
62+
run: bin/rails test test/*
63+
64+
- name: Publish Code Coverage
65+
env:
66+
GIT_BRANCH: ${GITHUB_REF/refs\/heads\//}
67+
run: ./cc-test-reporter after-build -r ${{ secrets.CodeClimate }}
68+
if: github.ref == 'refs/heads/main'

0 commit comments

Comments
 (0)