drop boilerplated part #584
This file contains hidden or 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: Test | |
| on: [push, pull_request] | |
| env: | |
| FULL_COVERAGE_CHECK: false # Someday, someday... | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| # We want to run on external PRs, but not on our own internal PRs as they'll be run on push event | |
| if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != 'umbrellio/utils' | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| ruby: ["3.1", "3.2", "3.3", "3.4"] | |
| env: | |
| PGHOST: pg | |
| PGUSER: user | |
| PGPASSWORD: pass | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Create docker network | |
| run: docker network create dbnet | |
| - name: Start PostgreSQL | |
| run: | | |
| docker run -d \ | |
| --name pg \ | |
| --network dbnet \ | |
| -e POSTGRES_PASSWORD=pass \ | |
| -e POSTGRES_USER=user \ | |
| -e POSTGRES_DB=umbrellio_utils_test \ | |
| -p 5432:5432 \ | |
| postgres:14 | |
| - name: Start ClickHouse | |
| run: | | |
| docker run -d \ | |
| --name ch \ | |
| --network dbnet \ | |
| -e CLICKHOUSE_SKIP_USER_SETUP=1 -e CLICKHOUSE_DB=umbrellio_utils_test \ | |
| -p 9000:9000 -p 8123:8123 \ | |
| -v ${{ github.workspace }}/.github/clickhouse/clickhouse_keeper.xml:/etc/clickhouse-server/config.d/keeper.xml \ | |
| clickhouse/clickhouse-server:25.3.6.56-alpine | |
| - name: Wait for Postgres | |
| run: | | |
| for i in {1..30}; do | |
| if docker exec pg pg_isready -U user; then exit 0; fi | |
| sleep 1 | |
| done | |
| exit 1 | |
| - name: Wait for ClickHouse | |
| run: | | |
| for i in {1..30}; do | |
| if docker exec ch clickhouse-client --query "SELECT 1"; then exit 0; fi | |
| sleep 1 | |
| done | |
| exit 1 | |
| - uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: ${{ matrix.ruby }} | |
| rubygems: latest | |
| bundler-cache: true | |
| - name: Run Linter | |
| run: bundle exec ci-helper RubocopLint | |
| - name: Check missed spec suffixes | |
| run: bundle exec ci-helper CheckSpecSuffixes --extra-paths spec/*.rb --ignored-paths spec/*_helper.rb | |
| - name: Run specs | |
| run: bundle exec ci-helper RunSpecs | |
| # - name: Coveralls | |
| # uses: coverallsapp/github-action@master | |
| # with: | |
| # github-token: ${{ secrets.GITHUB_TOKEN }} |