1515 codecov_token :
1616 description : Codecov token
1717 required : true
18- rails_master_key :
19- description : The Rails master key
20- required : true
21-
2218
2319jobs :
2420 build :
2521 name : Build
2622 runs-on : ubuntu-latest
2723 steps :
2824 - name : Checkout code
29- uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
25+ uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
3026 with :
3127 ref : ${{ inputs.sha }}
3228
3329 - name : Build test image
34- uses : guidojw/actions/build-docker-image@3ad963828827110a6b716a011f242bf01fdf1db4 # v1.4.7
30+ uses : guidojw/actions/build-docker-image@93f79307970f9904f178fa99c97bf02f5bc955c9 # v2.0.0
3531 with :
3632 file : Dockerfile
3733 build-args : |
5753 - 5432:5432
5854 steps :
5955 - name : Checkout code
60- uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
56+ uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
6157 with :
6258 ref : ${{ inputs.sha }}
6359
@@ -68,29 +64,41 @@ jobs:
6864
6965 - name : Download actionlint
7066 run : |
71- bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash) 1.7.7
67+ bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash) 1.7.8
7268
7369 - name : Load test image
74- uses : guidojw/actions/load-docker-image@3ad963828827110a6b716a011f242bf01fdf1db4 # v1.4.7
70+ uses : guidojw/actions/load-docker-image@93f79307970f9904f178fa99c97bf02f5bc955c9 # v2.0.0
7571 with :
7672 name : app
7773
7874 - name : Lint
79- env :
80- RAILS_MASTER_KEY : ${{ secrets.RAILS_MASTER_KEY }}
8175 run : |
8276 EXIT_STATUS=0
83- ./actionlint -ignore 'SC2153:' -ignore 'property "sha" is not defined in object type {}' || \
77+ ./actionlint \
78+ -ignore 'property "gh_app_private_key" is not defined' \
79+ -ignore 'SC2153:' \
80+ -ignore 'property "sha" is not defined in object type {}' || \
81+ EXIT_STATUS=$?
82+ docker run \
83+ -e POSTGRES_USER=postgres \
84+ -e POSTGRES_PASSWORD=postgres \
85+ -e POSTGRES_HOST=localhost \
86+ --network=host \
87+ app bin/ci.sh lint || \
8488 EXIT_STATUS=$?
85- docker run -e POSTGRES_USER=postgres -e POSTGRES_PASSWORD=postgres -e POSTGRES_HOST=localhost -e \
86- RAILS_MASTER_KEY --network=host app bin/ci.sh lint || EXIT_STATUS=$?
8789 exit $EXIT_STATUS
8890
8991 test :
9092 name : Test
9193 runs-on : ubuntu-latest
9294 needs : build
95+ env :
96+ CAMO_KEY : secret_camo_key
9397 services :
98+ camo :
99+ image : rx14/camo.cr:latest@sha256:5e55c311ea0ca56532aedfa71953bde9e7f4518f3381d413835c87c86a893ca8
100+ env :
101+ PORT : 9090
94102 db :
95103 image : postgres:14.7
96104 env :
@@ -105,7 +113,7 @@ jobs:
105113 - 5432:5432
106114 steps :
107115 - name : Checkout code
108- uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
116+ uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
109117 with :
110118 ref : ${{ inputs.sha }}
111119
@@ -114,28 +122,35 @@ jobs:
114122 echo '::add-matcher::.github/problem-matchers/rspec.json'
115123
116124 - name : Load test image
117- uses : guidojw/actions/load-docker-image@3ad963828827110a6b716a011f242bf01fdf1db4 # v1.4.7
125+ uses : guidojw/actions/load-docker-image@93f79307970f9904f178fa99c97bf02f5bc955c9 # v2.0.0
118126 with :
119127 name : app
120128
121129 - name : Test
122130 env :
123- RAILS_MASTER_KEY : ${{ secrets.RAILS_MASTER_KEY }}
131+ CAMO_HOST : localhost:9090
124132 run : |
125133 mkdir coverage
126- docker run -e POSTGRES_USER=postgres -e POSTGRES_PASSWORD=postgres -e POSTGRES_HOST=localhost -e \
127- RAILS_MASTER_KEY --network=host -v "$(pwd)"'/coverage:/app/coverage' app bin/ci.sh spec
134+ docker run \
135+ -e CAMO_KEY \
136+ -e CAMO_HOST \
137+ -e POSTGRES_USER=postgres \
138+ -e POSTGRES_PASSWORD=postgres \
139+ -e POSTGRES_HOST=localhost \
140+ --network=host \
141+ -v "$(pwd)"'/coverage:/app/coverage' \
142+ app bin/ci.sh spec
128143
129144 - name : Upload coverage report to Codecov
130145 if : ${{ !cancelled() }}
131- uses : codecov/codecov-action@0565863a31f2c772f9f0395002a31e3f06189574 # v5.4.0
146+ uses : codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1
132147 with :
133148 fail_ci_if_error : true
134149 token : ${{ secrets.CODECOV_TOKEN }}
135150
136151 - name : Upload coverage report artifact
137152 if : ${{ !cancelled() }}
138- uses : actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1
153+ uses : actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
139154 with :
140155 name : coverage
141156 path : coverage/
0 commit comments