diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6260e06dd..e8f0d27a6 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -11,10 +11,10 @@ jobs: enforce-g_malloc: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v4 - - name: enforce-g_malloc - run: "! git grep -P '(?> ${GITHUB_ENV} + - name: setup $HOME for git + run: echo "HOME=${RUNNER_TEMP}" >> ${GITHUB_ENV} - - name: configure safe directory for git - run: git config --global --add safe.directory ${GITHUB_WORKSPACE} + - name: configure safe directory for git + run: git config --global --add safe.directory ${GITHUB_WORKSPACE} - - name: build - run: make -j all dunstify test/test + - name: build + run: make -j all dunstify test/test - - name: test - run: make -j test + - name: test + run: make -j test - - name: installation - run: ./test/test-install.sh + - name: installation + run: ./test/test-install.sh - - name: valgrind memleaks - run: make -j clean test-valgrind + - name: valgrind memleaks + run: make -j clean test-valgrind - - name: coverage - run: make clean test-coverage + runs-on: ubuntu-latest + container: + image: ghcr.io/dunst-project/docker-images:${{ matrix.distro }} - - name: Generate coverage report - run: lcov -c -d . -o lcov.info - if: "matrix.CC == 'gcc'" + coverage: + needs: build + if: github.repository == 'dunst-project/dunst' + env: + CC: gcc - - name: Upload coverage to Codecov - uses: codecov/codecov-action@v3 - with: - token: ${{ secrets.CODECOV_TOKEN }} - flags: unittests - name: ${{ matrix.distro }}-${{ matrix.CC }} - fail_ci_if_error: true - if: "matrix.CC == 'gcc'" + steps: + - uses: actions/checkout@v4 + with: + # Clone the whole history including tags. + fetch-depth: 0 + + - name: coverage + run: make clean test-coverage + + - name: Generate coverage report + run: lcov -c -d . -o lcov.info + + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v3 + with: + token: ${{ secrets.CODECOV_TOKEN }} + flags: unittests + name: fedora-gcc + fail_ci_if_error: true runs-on: ubuntu-latest container: - image: ghcr.io/dunst-project/docker-images:${{ matrix.distro }} + image: ghcr.io/dunst-project/docker-images:fedora doxygen: steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v4 - - name: doxygen - run: make -j doc-doxygen + - name: doxygen + run: make -j doc-doxygen runs-on: ubuntu-latest container: