]> git.ipfire.org Git - thirdparty/libcgroup.git/commitdiff
github: Add self-hosted runner 52/head
authorTom Hromatka <tom.hromatka@oracle.com>
Wed, 2 Jun 2021 21:07:29 +0000 (21:07 +0000)
committerTom Hromatka <tom.hromatka@oracle.com>
Mon, 21 Jun 2021 21:18:50 +0000 (15:18 -0600)
Add a self-hosted runner to test full v2 functionality

Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
.github/actions/setup-libcgroup/action.yml
.github/workflows/continuous-integration.yml

index f11969713b4fe7465a20db6d1867fdd9934b4e7e..3a62ecabfb6a2950f288c09385e913b00c7a44a4 100644 (file)
@@ -24,7 +24,7 @@ description: "Install dependencies, git clone, bootstrap, configure, and make li
 runs:
   using: "composite"
   steps:
-  - run: sudo apt update
+  - run: sudo apt-get update
     shell: bash
   - run: sudo apt-get install libpam-dev lcov
     shell: bash
index 126d6b8838d81587217e4d6e0747d36190cc7d41..1eb29d59bcefaa4f4fc3ec311266c82c4ee3ee71 100644 (file)
@@ -89,8 +89,8 @@ jobs:
         flag-name: "Cgroup v1 Functional Tests"
         parallel: True
 
-  functionaltestsv2:
-    name: Cgroup v2 Functional Tests
+  functionaltestsv1v2:
+    name: Cgroup v1/v2 Functional Tests
     runs-on: ubuntu-20.04
 
     steps:
@@ -106,6 +106,42 @@ jobs:
         cat /sys/fs/cgroup/unified/cgroup.subtree_control
     - name: Install container dependencies
       run: sudo apt-get install lxc lxd
+    - uses: actions/checkout@v2
+      with:
+        submodules: false
+    - name: Initialize the directory
+      uses: ./.github/actions/setup-libcgroup
+    - name: Run functional tests
+      run: |
+        make check
+        pushd tests/ftests
+        popd
+    - name: Display test logs
+      if: ${{ always() }}
+      run: |
+        cat tests/ftests/ftests.sh.log
+        cat tests/ftests/ftests-nocontainer.sh.log
+    - name: Archive test logs
+      if: ${{ always() }}
+      uses: actions/upload-artifact@v2
+      with:
+        name: Cgroup v1v2 test logs
+        path: tests/ftests/*.log
+    - name: Collate code coverage results
+      run: lcov -d . -c > lcov.info
+    - name: Upload code coverage results
+      uses: coverallsapp/github-action@master
+      with:
+        github-token: ${{ secrets.GITHUB_TOKEN }}
+        path-to-lcov: ./lcov.info
+        flag-name: "Cgroup v1/v2 Functional Tests"
+        parallel: True
+
+  functionaltestsv2:
+    name: Cgroup v2 Functional Tests
+    runs-on: self-hosted
+
+    steps:
     - uses: actions/checkout@v2
       with:
         submodules: false
@@ -139,7 +175,7 @@ jobs:
 
   finalize:
     name: Finalize the test run
-    needs: [unittests, functionaltestsv1, functionaltestsv2]
+    needs: [unittests, functionaltestsv1, functionaltestsv1v2, functionaltestsv2]
     runs-on: ubuntu-latest
     steps:
     - name: Finalize code coverage results