1- name : OpenWRT OPENWISP MONITORING CI Build
1+ name : OpenWrt OpenWISP Monitoring CI Build
22
33on :
44 push :
1111jobs :
1212 tests :
1313 name : QA-Checks and Tests
14- runs-on : ubuntu-20 .04
14+ runs-on : ubuntu-24 .04
1515 steps :
16- - uses : actions/checkout@v2
16+ - uses : actions/checkout@v6
1717 with :
1818 ref : ${{ github.event.pull_request.head.sha }}
1919
2020 - name : Set up Python
21- uses : actions/setup-python@v2
21+ uses : actions/setup-python@v6
2222 with :
23- python-version : 3.7
23+ # This limitation can be removed once docstrfmt
24+ # is upgraded to 2.0.0 or higher (in openwisp-utils).
25+ python-version : " 3.13"
2426
25- - name : Install Python dependencies
26- run : pip install openwisp-utils[qa]>=0.7
27-
28- - name : Install Development dependencies
29- run : sudo ./install-dev.sh
27+ - name : Install dependencies
28+ id : deps
29+ run : |
30+ pip install "openwisp-utils[qa]~=1.2.1"
31+ sudo ./install-dev.sh
3032
3133 - name : QA-Checks
3234 run : ./run-qa-checks
3335 env :
3436 CI : 1
3537
3638 - name : Run sh-checker
37- uses : luizm/action-sh-checker@master
39+ uses : luizm/action-sh-checker@v0.9.0
3840 env :
3941 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
4042 with :
4143 sh_checker_comment : true
4244
4345 - name : Tests
46+ if : ${{ !cancelled() && steps.deps.conclusion == 'success' }}
4447 run : ./runtests
4548
4649 - name : Upload Coverage
50+ if : ${{ success() }}
4751 run : |
4852 cd openwisp-monitoring/tests
4953 luacov-coveralls -v
@@ -52,25 +56,24 @@ jobs:
5256
5357 build :
5458 name : Build and upload package as artifacts
55- needs : tests
56- runs-on : ubuntu-20.04
59+ runs-on : ubuntu-24.04
5760 env :
58- BUILD_DIR : ' /home/runner/work/build'
59- DOWNLOADS_DIR : ' /home/runner/work/downloads'
61+ BUILD_DIR : " /home/runner/work/build"
62+ DOWNLOADS_DIR : " /home/runner/work/downloads"
6063 CORES : 2
6164
6265 steps :
63- - uses : actions/checkout@v2
66+ - uses : actions/checkout@v6
6467 with :
6568 ref : ${{ github.event.pull_request.head.sha }}
6669
67- - name : Cache OpenWRT dependencies
70+ - name : Cache OpenWrt dependencies
6871 id : cache
69- uses : actions/cache@v2
72+ uses : actions/cache@v5
7073 env :
7174 cache-name : cache-openwrt-dependencies
7275 with :
73- path : ' /home/runner/work/build'
76+ path : " /home/runner/work/build"
7477 key : ${{ runner.os }}-build-${{ env.cache-name }}
7578
7679 - name : Set Environment
@@ -87,17 +90,24 @@ jobs:
8790 CI_CACHE : ${{ steps.cache.outputs.cache-hit }}
8891
8992 - name : Upload packages as artifacts
90- uses : actions/upload-artifact@v2
93+ if : ${{ github.event_name=='push' }}
94+ uses : actions/upload-artifact@v6
9195 with :
9296 name : Packages
9397 path : " ${{ env.DOWNLOADS_DIR }}/${{ env.START_TIME }}"
9498
95- - name : Setup Google Cloud
96- uses : google-github-actions/setup-gcloud@v0
99+ - name : Google Cloud Auth
100+ if : ${{ github.event_name=='push' }}
101+ uses : " google-github-actions/auth@v3"
102+ with :
103+ project_id : ${{ secrets.GCS_PROJECT_ID }}
104+ credentials_json : ${{ secrets.GCS_DOWNLOADS_SERVICE_ACCOUNT_JSON }}
105+
106+ - name : Google Cloud Setup
107+ if : ${{ github.event_name=='push' }}
108+ uses : google-github-actions/setup-gcloud@v3
97109 with :
98- service_account_key : ${{ secrets.GCS_DOWNLOADS_SERVICE_ACCOUNT_JSON }}
99110 project_id : ${{ secrets.GCS_PROJECT_ID }}
100- export_default_credentials : true
101111
102112 - name : Upload compiled packages to downloads.openwisp.io
103113 if : ${{ github.event_name=='push' }}
0 commit comments