mirror of
https://github.com/Icinga/icingadb.git
synced 2026-05-28 04:35:54 -04:00
actions/upload-artifact@v7 introduced this new option, use it to avoid compressing twice. That should also make checking the artifacts nicer as you can just use tools like xzgrep. With that set, it seems to ignore the `name` input, hence the log file is renamed beforehand to have distinct file names across jobs.
56 lines
1.6 KiB
YAML
56 lines
1.6 KiB
YAML
name: Integration Tests
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
- 'support/*'
|
|
pull_request: {}
|
|
schedule:
|
|
- cron: '57 3 * * *'
|
|
|
|
jobs:
|
|
integration-tests:
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
database:
|
|
- name: mysql
|
|
pretty_name: MySQL
|
|
- name: pgsql
|
|
pretty_name: PostgreSQL
|
|
|
|
name: ${{ matrix.database.pretty_name }}
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v6
|
|
- name: Setup Go
|
|
uses: actions/setup-go@v6
|
|
with:
|
|
go-version: 1.x
|
|
- name: Build Icinga DB
|
|
run: go build ./cmd/icingadb
|
|
env:
|
|
CGO_ENABLED: 0
|
|
- name: Build Integration Tests
|
|
run: go test -o ../icingadb-test -c .
|
|
working-directory: tests/
|
|
- name: Run Integration Tests
|
|
run: ./icingadb-test -icingatesting.debuglog ${{ matrix.database.name }}-debug.log -test.v
|
|
env:
|
|
ICINGADB_TESTS_DATABASE_TYPE: ${{ matrix.database.name }}
|
|
ICINGA_TESTING_ICINGADB_BINARY: ${{ github.workspace }}/icingadb
|
|
ICINGA_TESTING_ICINGADB_SCHEMA_MYSQL: ${{ github.workspace }}/schema/mysql/schema.sql
|
|
ICINGA_TESTING_ICINGADB_SCHEMA_PGSQL: ${{ github.workspace }}/schema/pgsql/schema.sql
|
|
- name: Compress Debug Log
|
|
if: ${{ always() }}
|
|
run: xz -9 ${{ matrix.database.name }}-debug.log
|
|
- name: Upload Debug Log
|
|
if: ${{ always() }}
|
|
uses: actions/upload-artifact@v7
|
|
with:
|
|
path: ${{ matrix.database.name }}-debug.log.xz
|
|
archive: false
|
|
retention-days: 1
|