Fix compose integration test: serial file no longer created on bootstrap #14
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"] | |
| permissions: | |
| contents: read | |
| # Cancel in-flight runs for the same branch/PR so pushes don't queue up. | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| # ── Format / vet / tidy ────────────────────────────────────────────────────── | |
| check: | |
| name: Format / vet / tidy | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: go.mod | |
| cache: true | |
| - name: Install Mage | |
| run: go install github.com/magefile/mage@v1.15.0 | |
| - name: Check formatting, vet, and module tidy | |
| run: mage dev:check | |
| # ── Unit tests ─────────────────────────────────────────────────────────────── | |
| unit: | |
| name: Unit tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: go.mod | |
| cache: true | |
| - name: Install Mage | |
| run: go install github.com/magefile/mage@v1.15.0 | |
| - name: Run unit tests | |
| run: mage test:unit | |
| # ── Integration tests (podman, single container) ───────────────────────────── | |
| # ubuntu-latest ships podman; integration.sh uses it directly. | |
| # The matrix runs the test suite twice: once against the standard binary | |
| # (CGO_ENABLED=0) and once against the FIPS binary (GOEXPERIMENT=boringcrypto, | |
| # CGO_ENABLED=1). gcc is pre-installed on ubuntu-latest so no extra setup | |
| # is needed for the FIPS build. | |
| integration: | |
| name: Integration tests (${{ matrix.build }}) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - build: standard | |
| mage_target: test:integ | |
| - build: fips | |
| mage_target: test:integFIPS | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: go.mod | |
| cache: true | |
| - name: Install Mage | |
| run: go install github.com/magefile/mage@v1.15.0 | |
| - name: Run integration tests | |
| env: | |
| MAGE_TARGET: ${{ matrix.mage_target }} | |
| run: mage "$MAGE_TARGET" | |
| # ── Puppet stack integration tests ────────────────────────────────────────── | |
| # Runs the full OpenVox 8 stack: Go CA (TLS) → OpenVox Server (WEBrick) → | |
| # OpenVoxDB. Requires docker compose and network access to pull base images | |
| # on first run. Same standard/FIPS matrix as the other integration jobs. | |
| puppet: | |
| name: Puppet stack tests (${{ matrix.build }}) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - build: standard | |
| mage_target: test:puppet | |
| - build: fips | |
| mage_target: test:puppetFIPS | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: go.mod | |
| cache: true | |
| - name: Install Mage | |
| run: go install github.com/magefile/mage@v1.15.0 | |
| - name: Run Puppet stack integration tests | |
| env: | |
| MAGE_TARGET: ${{ matrix.mage_target }} | |
| run: mage "$MAGE_TARGET" | |
| # ── Compose integration tests (docker compose) ─────────────────────────────── | |
| # podman-compose is not pre-installed on GitHub runners; composeCmd() in | |
| # magefile.go falls back to `docker compose` (v2 plugin, always available). | |
| # Same standard/FIPS matrix as the single-container integration job above. | |
| compose: | |
| name: Compose integration tests (${{ matrix.build }}) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - build: standard | |
| mage_target: test:integCompose | |
| - build: fips | |
| mage_target: test:integComposeFIPS | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: go.mod | |
| cache: true | |
| - name: Install Mage | |
| run: go install github.com/magefile/mage@v1.15.0 | |
| - name: Run compose integration tests | |
| env: | |
| MAGE_TARGET: ${{ matrix.mage_target }} | |
| run: mage "$MAGE_TARGET" |