BXC-5606 - HTTP API for register and deregister event #25
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: CI | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| ruby-version: ['3.0', '3.1', 'jruby-9.4'] | |
| db: [sqlite, postgres] | |
| include: | |
| - ruby-version: '3.0' | |
| bundler: '2.5.23' | |
| - ruby-version: '3.1' | |
| bundler: '2.6.3' | |
| - ruby-version: 'jruby-9.4' | |
| bundler: '2.6.3' | |
| name: Test with Ruby ${{ matrix.ruby-version }} / ${{ matrix.db }} | |
| services: | |
| postgres: | |
| image: postgres:16 | |
| env: | |
| POSTGRES_USER: postgres | |
| POSTGRES_PASSWORD: postgres | |
| POSTGRES_DB: longleaf_test | |
| options: > | |
| --health-cmd pg_isready | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| ports: | |
| - 5432:5432 | |
| timeout-minutes: 60 | |
| env: | |
| JRUBY_OPTS: "--dev" | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Set up Ruby ${{ matrix.ruby-version }} | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: ${{ matrix.ruby-version }} | |
| bundler: ${{ matrix.bundler }} | |
| - name: Install dependencies | |
| run: bundle install --path '.bundle/' --with ${{ matrix.db }} | |
| - name: Install rsync | |
| run: sudo apt-get update && sudo apt-get install -y rsync | |
| - name: Run tests | |
| env: | |
| TEST_DATABASE: ${{ matrix.db }} | |
| TEST_PG_URL: postgres://postgres:postgres@localhost/longleaf_test | |
| run: | | |
| mkdir -p tmp/test-results | |
| bundle exec rspec \ | |
| --format progress \ | |
| --format RspecJunitFormatter \ | |
| --out tmp/test-results/rspec.xml \ | |
| spec | |
| - name: Publish test results | |
| uses: dorny/test-reporter@v1 | |
| if: always() | |
| with: | |
| name: RSpec Tests (Ruby ${{ matrix.ruby-version }} / ${{ matrix.db }}) | |
| path: tmp/test-results/rspec.xml | |
| reporter: java-junit | |
| - name: Upload coverage | |
| uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: coverage-ruby-${{ matrix.ruby-version }}-${{ matrix.db }} | |
| path: coverage |