From f61c793c4af439cdba122ccc7bd2c32305219672 Mon Sep 17 00:00:00 2001 From: Coiby Xu Date: Fri, 15 Apr 2022 18:15:17 +0800 Subject: [PATCH] run tests via Github Action --- .github/workflows/integration.yml | 30 ++++++++++++++++++++++++++++++ tools/test-github.sh | 10 ++++++++++ 2 files changed, 40 insertions(+) create mode 100644 .github/workflows/integration.yml create mode 100644 tools/test-github.sh diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml new file mode 100644 index 0000000..feaa536 --- /dev/null +++ b/.github/workflows/integration.yml @@ -0,0 +1,30 @@ +name: Integration Test + +on: + pull_request: + branches: [ github_action ] + +jobs: + test: + runs-on: ubuntu-latest + timeout-minutes: 45 + concurrency: + group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.container }}-${{ matrix.test }} + cancel-in-progress: true + strategy: + matrix: + container: [ + "fedora:latest", + ] + fail-fast: false + container: + image: ghcr.io/dracutdevs/${{ matrix.container }} + options: "--privileged -v /dev:/dev -v /lib/modules:/lib/modules:ro" + steps: + - name: "Checkout Repository" + uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: "${{ matrix.container }} kdump tests" + run: ./tools/test-github.sh diff --git a/tools/test-github.sh b/tools/test-github.sh new file mode 100644 index 0000000..a0348b8 --- /dev/null +++ b/tools/test-github.sh @@ -0,0 +1,10 @@ +#!/bin/bash +set -ex + +[[ -d ${0%/*} ]] && cd "${0%/*}"/../ + +source /etc/os-release + +cd TESTS + +RELEASE=$VERSION_ID make test-run