We currently set up PostgreSQL, Ruby, Clover, and databases separately in each workflow using the same steps. To simplify and standardize this, we’re extracting these steps into a shared action. Notably, we install PostgreSQL directly on the system instead of using a Docker container for three main reasons: 1. Reusable workflows don’t support GitHub Action's `services` feature. 2. macOS runners are free for open source projects and help us catch platform-specific issues. However, they don’t come with Docker due to licensing restrictions, making container-based setups more difficult. 3. Our controlplane tests have been taking longer. To support running tests in parallel, we need more flexible database configurations than what the default Docker setup allows. This change should reduce duplication, simplify maintenance, and improve testing flexibility across platforms.
47 lines
1.0 KiB
YAML
47 lines
1.0 KiB
YAML
name: respirate CI
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- 'bin/respirate'
|
|
- 'scheduling/dispatcher.rb'
|
|
- 'model/strand.rb'
|
|
- 'prog/test.rb'
|
|
- 'spec/respirate_smoke_test.rb'
|
|
- '.github/workflows/respirate-ci.yml'
|
|
- '.github/actions/setup-clover/action.yml'
|
|
pull_request:
|
|
paths:
|
|
- 'bin/respirate'
|
|
- 'scheduling/dispatcher.rb'
|
|
- 'model/strand.rb'
|
|
- 'prog/test.rb'
|
|
- 'spec/respirate_smoke_test.rb'
|
|
- '.github/workflows/respirate-ci.yml'
|
|
- '.github/actions/setup-clover/action.yml'
|
|
|
|
jobs:
|
|
cli-ci:
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
runs-on: [ubicloud, ubicloud-arm]
|
|
name: respirate CI - ${{matrix.runs-on}}
|
|
runs-on: ${{matrix.runs-on}}
|
|
|
|
steps:
|
|
- name: Check out code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Clover
|
|
uses: ./.github/actions/setup-clover
|
|
|
|
- name: Run respirate smoke test
|
|
run: bundle exec rake respirate_smoke_test
|