Update paambaati/codeclimate-action action to v9 #392
Workflow file for this run
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: CI | |
on: | |
push: | |
pull_request: | |
schedule: | |
- cron: '0 0 * * 0' | |
jobs: | |
ci: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
ruby-version: | |
- '2.7' | |
- '3.0' | |
- '3.1' | |
services: | |
postgres: | |
image: postgres:13 | |
env: | |
POSTGRES_PASSWORD: password | |
POSTGRES_DB: virtual_attributes | |
options: --health-cmd pg_isready --health-interval 2s --health-timeout 5s --health-retries 5 | |
ports: | |
- 5432:5432 | |
mysql: | |
image: mysql:8.4 | |
env: | |
MYSQL_ROOT_PASSWORD: password | |
MYSQL_DATABASE: virtual_attributes | |
options: --health-cmd="mysqladmin ping -h 127.0.0.1 -P 3306 --silent" --health-interval 10s --health-timeout 5s --health-retries 3 | |
ports: | |
- 3306:3306 | |
env: | |
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }} | |
# for the pg cli (psql, pg_isready) and rails | |
PGHOST: localhost | |
PGPORT: 5432 | |
PGUSER: postgres | |
PGPASSWORD: password | |
# for the mysql cli (mysql, mysqladmin) | |
MYSQL_HOST: 127.0.0.1 | |
MYSQL_PWD: password | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ matrix.ruby-version }} | |
bundler-cache: true | |
timeout-minutes: 30 | |
- name: Run SQLite tests | |
env: | |
DB: sqlite3 | |
run: bundle exec rake | |
- name: Run PostgreSQL tests | |
env: | |
DB: postgresql | |
COLLATE_SYMBOLS: false | |
run: bundle exec rake | |
- name: Run MySQL tests | |
env: | |
DB: mysql2 | |
run: bundle exec rake | |
- name: Report code coverage | |
if: ${{ github.ref == 'refs/heads/master' && matrix.ruby-version == '3.1' }} | |
continue-on-error: true | |
uses: paambaati/codeclimate-action@v9 | |
env: | |
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }} |