From b09c6d56832eb1718c07d74abf3bc6ae3fe4e030 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 28 Apr 2024 14:36:04 +0200 Subject: Adding upstream version 1.1.0. Signed-off-by: Daniel Baumann --- .github/workflows/integration-tests.yml | 55 +++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 .github/workflows/integration-tests.yml (limited to '.github/workflows/integration-tests.yml') diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml new file mode 100644 index 0000000..dff8112 --- /dev/null +++ b/.github/workflows/integration-tests.yml @@ -0,0 +1,55 @@ +name: Integration Tests + +on: + push: + branches: + - master + 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@v2 + - name: Setup Go + uses: actions/setup-go@v2 + with: + go-version: '^1.18' + - 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 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 debug.log + - name: Upload Debug Log + if: ${{ always() }} + uses: actions/upload-artifact@v2 + with: + name: ${{ matrix.database.name }}-debug.log.xz + path: debug.log.xz + retention-days: 1 -- cgit v1.2.3