Skip to content

chore(deps): update codecov/codecov-action action to v5.5.1 #1703

chore(deps): update codecov/codecov-action action to v5.5.1

chore(deps): update codecov/codecov-action action to v5.5.1 #1703

name: Continuous Integration
on:
push:
branches: [staging, master]
pull_request:
merge_group:
workflow_call:
inputs:
sha:
description: The commit SHA to run the workflow on
required: false
type: string
secrets:
codecov_token:
description: Codecov token
required: true
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
ref: ${{ inputs.sha }}
- name: Build test image
uses: guidojw/actions/build-docker-image@93f79307970f9904f178fa99c97bf02f5bc955c9 # v2.0.0
with:
file: Dockerfile
build-args: |
BUNDLE_INSTALL_EXCLUDE=development
name: app
lint:
name: Lint
runs-on: ubuntu-latest
needs: build
services:
db:
image: postgres:14.7
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- name: Checkout code
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
ref: ${{ inputs.sha }}
- name: Add problem matchers
run: |
echo '::add-matcher::.github/problem-matchers/actionlint.json'
echo '::add-matcher::.github/problem-matchers/rubocop.json'
- name: Download actionlint
run: |
bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash) 1.7.7
- name: Load test image
uses: guidojw/actions/load-docker-image@93f79307970f9904f178fa99c97bf02f5bc955c9 # v2.0.0
with:
name: app
- name: Lint
run: |
EXIT_STATUS=0
./actionlint \
-ignore 'property "gh_app_private_key" is not defined' \
-ignore 'SC2153:' \
-ignore 'property "sha" is not defined in object type {}' || \
EXIT_STATUS=$?
docker run \
-e POSTGRES_USER=postgres \
-e POSTGRES_PASSWORD=postgres \
-e POSTGRES_HOST=localhost \
--network=host \
app bin/ci.sh lint || \
EXIT_STATUS=$?
exit $EXIT_STATUS
test:
name: Test
runs-on: ubuntu-latest
needs: build
env:
CAMO_KEY: secret_camo_key
services:
camo:
image: rx14/camo.cr:latest@sha256:5e55c311ea0ca56532aedfa71953bde9e7f4518f3381d413835c87c86a893ca8
env:
PORT: 9090
db:
image: postgres:14.7
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- name: Checkout code
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
ref: ${{ inputs.sha }}
- name: Add problem matchers
run: |
echo '::add-matcher::.github/problem-matchers/rspec.json'
- name: Load test image
uses: guidojw/actions/load-docker-image@93f79307970f9904f178fa99c97bf02f5bc955c9 # v2.0.0
with:
name: app
- name: Test
env:
CAMO_HOST: localhost:9090
run: |
mkdir coverage
docker run \
-e CAMO_KEY \
-e CAMO_HOST \
-e POSTGRES_USER=postgres \
-e POSTGRES_PASSWORD=postgres \
-e POSTGRES_HOST=localhost \
--network=host \
-v "$(pwd)"'/coverage:/app/coverage' \
app bin/ci.sh spec
- name: Upload coverage report to Codecov
if: ${{ !cancelled() }}
uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1
with:
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
- name: Upload coverage report artifact
if: ${{ !cancelled() }}
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: coverage
path: coverage/
if-no-files-found: error