File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : CI for Python Scraper (Main)
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ workflow_dispatch :
8+
9+ jobs :
10+ build-lint-test-scan :
11+ runs-on : ubuntu-latest
12+
13+ steps :
14+ - name : Checkout code
15+ uses : actions/checkout@v4
16+ with :
17+ fetch-depth : 0 # Required for SonarCloud
18+
19+ - name : Set up Python 3.11
20+ uses : actions/setup-python@v5
21+ with :
22+ python-version : 3.11
23+
24+ - name : Install dependencies
25+ run : pip install requests pytest ruff
26+
27+ - name : Lint with Ruff
28+ continue-on-error : true
29+ run : |
30+ ruff check . --ignore E402
31+
32+ - name : Test with Pytest
33+ continue-on-error : true
34+ run : |
35+ export PYTHONPATH=$PYTHONPATH:.
36+ pytest unit_test/
37+
38+ - name : SonarCloud Scan
39+ continue-on-error : true
40+ uses : SonarSource/sonarcloud-github-action@v2
41+ env :
42+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
43+ SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
You can’t perform that action at this time.
0 commit comments