Skip to content

Commit

Permalink
Merge pull request #1088 from mulkieran/coverage-only-if-tests-succeed
Browse files Browse the repository at this point in the history
Run coverage only if tests succeed
  • Loading branch information
mulkieran authored Jul 23, 2024
2 parents bb1198b + 9ff17df commit 95195cb
Showing 1 changed file with 57 additions and 5 deletions.
62 changes: 57 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,18 +91,70 @@ jobs:
strategy:
matrix:
include:
# MANDATORY CHECKS USING CURRENT DEVELOPMENT ENVIRONMENT
- task: make -f Makefile all-tests
rust_log: RUST_LOG=stratisd=debug
image: fedora:40 # CURRENT DEVELOPMENT ENVIRONMENT
- task: make -f Makefile coverage-no-html
rust_log:
image: fedora:40 # CURRENT DEVELOPMENT ENVIRONMENT
# MANDATORY CHECKS USING LOWEST SUPPORTED ENVIRONMENT PROXY
- task: make -f Makefile all-tests
rust_log: RUST_LOG=stratisd=debug
image: fedora:34 # LOWEST DEVELOPMENT ENVIRONMENT
runs-on: ubuntu-latest
container:
image: ${{ matrix.image }}
# yamllint disable rule:line-length
options: --privileged --userns=host --ipc=host -v /run/dbus/system_bus_socket:/run/dbus/system_bus_socket:ro -v /usr/share/dbus-1:/usr/share/dbus-1
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: >
dnf install -y
asciidoc
clang
cryptsetup-devel
device-mapper-devel
dbus-devel
git
glibc-static
libblkid-devel
make
python3-dbus-client-gen
python3-dbus-python-client-gen
python3-justbytes
python3-dateutil
python3-packaging
python3-psutil
python3-wcwidth
systemd-devel
- uses: dtolnay/rust-toolchain@master
with:
components: cargo
toolchain: 1.71.1 # LOWEST SUPPORTED RUST TOOLCHAIN
- name: Check out stratisd
run: git clone https://github.com/stratis-storage/stratisd.git
- name: Build stratisd
run: PROFILEDIR=debug make build-all
working-directory: ./stratisd
- name: Install stratisd
run: PROFILEDIR=debug make install
working-directory: ./stratisd
- name: Workaround for D-Bus inotify
run: cp stratisd.conf /usr/share/dbus-1/system.d
working-directory: ./stratisd
- name: Run test
run: >
${{ matrix.rust_log }}
STRATISD=/usr/libexec/stratisd
PYTHONPATH=./src
${{ matrix.task }}
coverage-runs:
needs: test-runs
strategy:
matrix:
include:
- task: make -f Makefile coverage-no-html
rust_log:
image: fedora:40 # CURRENT DEVELOPMENT ENVIRONMENT
runs-on: ubuntu-latest
container:
image: ${{ matrix.image }}
# yamllint disable rule:line-length
Expand Down

0 comments on commit 95195cb

Please sign in to comment.