Skip to content

Commit

Permalink
ci: move test to separate action
Browse files Browse the repository at this point in the history
  • Loading branch information
variar committed Aug 27, 2021
1 parent cfe29e6 commit 1b472d7
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: "Build and test one configuration"
description: "Generate the build files, build the code and run the tests"
name: "Configure and build"
description: "Generate the build files and build the code"
runs:
using: "composite"
steps:
Expand Down
11 changes: 11 additions & 0 deletions .github/actions/agent-run-tests/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: "Run all tests"
description: "Run tests with ctest"
runs:
using: "composite"
steps:

- name: test
shell: sh
run: |
cd $KLOGG_BUILD_ROOT
ctest --verbose
10 changes: 10 additions & 0 deletions .github/actions/docker-run-tests/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: "Run tests in container"
description: "Run all the tests in container"
runs:
using: "composite"
steps:
- name: test
shell: sh
run: |
docker run --env KLOGG_BUILD_ROOT=$KLOGG_BUILD_ROOT -v "$KLOGG_WORKSPACE":/usr/local ${{ matrix.config.container }} /bin/bash -c "cd /usr/local/$KLOGG_BUILD_ROOT && ctest --verbose"
10 changes: 7 additions & 3 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ jobs:
#Build and test
- uses: ./.github/actions/klogg-version
- uses: ./.github/actions/prepare-workspace-env
- uses: ./.github/actions/build-and-test
- uses: ./.github/actions/agent-build
- uses: ./.github/actions/agent-run-tests

#Package
- name: Linux package
Expand Down Expand Up @@ -132,6 +133,7 @@ jobs:
- uses: ./.github/actions/klogg-version
- uses: ./.github/actions/prepare-workspace-env
- uses: ./.github/actions/docker-build
- uses: ./.github/actions/docker-run-tests

- name: package
run: |
Expand Down Expand Up @@ -206,7 +208,8 @@ jobs:
#Build and test
- uses: ./.github/actions/klogg-version
- uses: ./.github/actions/prepare-workspace-env
- uses: ./.github/actions/build-and-test
- uses: ./.github/actions/agent-build
- uses: ./.github/actions/agent-run-tests

#Package
- name: Mac prepare codesign
Expand Down Expand Up @@ -348,7 +351,8 @@ jobs:

- uses: ./.github/actions/klogg-version
- uses: ./.github/actions/prepare-workspace-env
- uses: ./.github/actions/build-and-test
- uses: ./.github/actions/agent-build
- uses: ./.github/actions/agent-run-tests

#Package
- name: Win codesign executables
Expand Down

0 comments on commit 1b472d7

Please sign in to comment.