]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
CI: run GCC unit test job on push to main
authorLuca Boccassi <luca.boccassi@microsoft.com>
Wed, 29 Sep 2021 10:36:22 +0000 (11:36 +0100)
committerEvgeny Vereshchagin <evvers@ya.ru>
Wed, 29 Sep 2021 11:10:42 +0000 (14:10 +0300)
Allows to get coverage data on coveralls.io

.github/workflows/unit_tests.yml

index ade9323cbb02d5bb546c09453fb43fb17dbce672..9055716ef2384595422aceca909927acacf5e72e 100644 (file)
@@ -3,6 +3,10 @@
 #
 name: Unit tests
 on:
+  # On push/merge to main we only run the GCC job, to get coverage data uploaded to coveralls.io
+  push:
+    branches:
+      - main
   pull_request:
     branches:
       - main
@@ -17,10 +21,13 @@ jobs:
     steps:
       - name: Repository checkout
         uses: actions/checkout@v2
+        if: github.event_name == 'pull_request' || matrix.run_phase == 'GCC'
       - name: Install build dependencies
         run: sudo -E .github/workflows/unit_tests.sh SETUP
+        if: github.event_name == 'pull_request' || matrix.run_phase == 'GCC'
       - name: Build & test (${{ matrix.run_phase }})
         run: sudo -E .github/workflows/unit_tests.sh RUN_${{ matrix.run_phase }}
+        if: github.event_name == 'pull_request' || matrix.run_phase == 'GCC'
       - name: Coveralls
         if: matrix.run_phase == 'GCC' && github.repository == 'systemd/systemd'
         uses: coverallsapp/github-action@master