name: Test on: [push, pull_request] jobs: sqlite: if: "!contains(github.event.head_commit.message, '[ci-skip]')" runs-on: "ubuntu-latest" strategy: fail-fast: false matrix: ruby_version: ["2.7"] steps: - uses: actions/checkout@v2 - uses: ruby/setup-ruby@v1 with: ruby-version: ${{ matrix.ruby_version }} - run: "bundle install" - name: Tests run: "bundle exec rake ci" postgres: if: "!contains(github.event.head_commit.message, '[ci-skip]')" runs-on: "ubuntu-latest" strategy: fail-fast: false matrix: ruby_version: ["2.6", "2.7"] services: postgres: image: postgres env: POSTGRES_PASSWORD: postgres options: >- --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 ports: - 5432:5432 steps: - uses: actions/checkout@v2 - uses: ruby/setup-ruby@v1 with: ruby-version: ${{ matrix.ruby_version }} - run: "bundle install" env: INSTALL_PG: "true" - run: "bundle exec rake ci" env: DATABASE_ADAPTER: github_actions_postgres INSTALL_PG: "true" mysql: if: "!contains(github.event.head_commit.message, '[ci-skip]')" runs-on: "ubuntu-latest" strategy: fail-fast: false matrix: ruby_version: ["2.7"] steps: - uses: actions/checkout@v2 - run: script/test/run-rake-on-docker-compose-mysql.sh rubocop: if: "!contains(github.event.head_commit.message, '[ci-skip]')" runs-on: "ubuntu-latest" steps: - uses: actions/checkout@v2 - uses: ruby/setup-ruby@v1 with: ruby-version: "2.7" - run: "bundle install" - run: "bundle exec rubocop" pact-verify: if: "!contains(github.event.head_commit.message, '[ci-skip]')" runs-on: "ubuntu-latest" steps: - uses: actions/checkout@v2 - uses: ruby/setup-ruby@v1 with: ruby-version: "2.7" - run: "bundle install" - name: Verify pacts run: "GIT_SHA=${GITHUB_SHA} GIT_BRANCH=${GITHUB_REF##*/} bundle exec rake pact:verify" env: PACTFLOW_PACT_OSS_TOKEN: ${{ secrets.PACTFLOW_PACT_OSS_TOKEN }} bundle-audit: if: "!contains(github.event.head_commit.message, '[ci-skip]')" runs-on: "ubuntu-latest" steps: - uses: actions/checkout@v2 - uses: ruby/setup-ruby@v1 with: ruby-version: "2.7" - run: "bundle install" - name: Audit run: "bundle exec rake bundle:audit"