tmp: less verbose, fewer warnings #440
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 | |
jobs: | |
linting: | |
runs-on: ubuntu-latest | |
name: Linting of Ruby files | |
steps: | |
- uses: zendesk/checkout@v3 | |
- name: Install Ruby, Bundler and gems | |
uses: zendesk/setup-ruby@v1 | |
with: | |
ruby-version: 2.7 | |
bundler-cache: true | |
- run: bundle exec standardrb | |
tests: | |
runs-on: ubuntu-latest | |
name: rake test Gemfile ${{ matrix.gemfile }} and Ruby ${{ matrix.ruby-version }} (LCH ${{ matrix.legacy_connection_handling }}) | |
services: | |
mysql: | |
image: mysql:5.7 | |
ports: | |
- 3306:3306 | |
env: | |
MYSQL_ALLOW_EMPTY_PASSWORD: "yes" | |
options: >- | |
--health-cmd "mysql -uroot -e 'show databases'" | |
--health-interval 2s | |
--health-timeout 1s | |
--health-retries 10 | |
strategy: | |
fail-fast: false | |
matrix: | |
ruby-version: | |
- "2.7" | |
- "3.0" | |
- "3.1" | |
- "3.2" | |
gemfile: | |
- rails6.1 | |
- rails7.0_mysql2 | |
- rails7.0_trilogy | |
- rails7.1_mysql2 | |
- rails7.1_trilogy | |
legacy_connection_handling: | |
- "false" | |
- "true" | |
exclude: | |
- {gemfile: rails7.1_mysql2, legacy_connection_handling: "true"} | |
- {gemfile: rails7.1_trilogy, legacy_connection_handling: "true"} | |
env: | |
BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile | |
LEGACY_CONNECTION_HANDLING: "${{ matrix.legacy_connection_handling }}" | |
steps: | |
- uses: zendesk/checkout@v3 | |
- name: Install Ruby, Bundler and gems | |
uses: zendesk/setup-ruby@v1 | |
with: | |
ruby-version: ${{ matrix.ruby-version }} | |
bundler-cache: true | |
- name: Create user 'john-doe' in MySQL | |
run: mysql --host 127.0.0.1 --port 3306 -uroot -e "CREATE USER 'john-doe'; GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,INDEX ON *.* TO 'john-doe'; FLUSH PRIVILEGES;" | |
- run: bundle exec rake test | |
tests_successful: | |
name: Tests passing? | |
needs: tests | |
if: always() | |
runs-on: ubuntu-latest | |
steps: | |
- run: | | |
if ${{ needs.tests.result == 'success' }} | |
then | |
echo "All tests passed" | |
else | |
echo "Some tests failed" | |
false | |
fi |