Переглянути джерело

fix hub tests CI (#469)

Co-authored-by: AlteredCoder <AlteredCoder>
AlteredCoder 4 роки тому
батько
коміт
5f339ab312

+ 3 - 3
.github/workflows/ci_functests-install.yml → .github/workflows/basic_functionnals_tests.yml

@@ -1,10 +1,10 @@
-name: Hub-CI
+name: Basic functionals tests
 
 on:
   push:
-    branches: [ functional_basic_tests ]
+    branches: [ master ]
   pull_request:
-    branches: [ functional_basic_tests ]
+    branches: [ master ]
 
 jobs:
   build:

+ 9 - 8
.github/workflows/ci_hub-tests.yml → .github/workflows/hub_tests.yml

@@ -1,4 +1,4 @@
-name: Hub-CI
+name: Hub tests
 
 on:
   push:
@@ -33,26 +33,27 @@ jobs:
         git clone https://github.com/crowdsecurity/hub-tests.git
         cd hub-tests
         make
-    - uses: oprypin/find-latest-tag@v1
+    - id: keydb
+      uses: pozetroninc/github-action-get-latest-release@master
       with:
-        repository: crowdsecurity/crowdsec  # The repository to scan.
-        releases-only: true  # We know that all relevant tags have a GitHub release for them.
-      id: crowdsec  # The step ID to refer to later.
+        owner: crowdsecurity
+        repo: crowdsec
+        excludes: prerelease, draft
     - name: Create crowdsec test env with all parsers from the release
       run: |
-        cd crowdsec-${{ steps.crowdsec.outputs.tag }}
+        cd crowdsec-${{ steps.keydb.outputs.release }}
         ./test_env.sh
         cd tests
         for i in `./cscli -c dev.yaml list parsers -a -o json | jq -r ".[].name" ` ; do 
           ./cscli -c dev.yaml install parser $i ; 
         done
     - name: Setup hub ci in crowdsec
-      working-directory: ./crowdsec-${{ steps.crowdsec.outputs.tag }}/tests/
+      working-directory: ./crowdsec-${{ steps.keydb.outputs.release }}/tests/
       run: |
         cp -R ../../hub-tests/tests .
         cp ../../hub-tests/main .
     - name: Run the HUB CI
-      working-directory: ./crowdsec-${{ steps.crowdsec.outputs.tag }}/tests/
+      working-directory: ./crowdsec-${{ steps.keydb.outputs.release }}/tests/
       run: |
         for i in `find ./tests -mindepth 1 -maxdepth 1 -type d` ; do 
           echo "::group::Test-${i}" ;