File tree Expand file tree Collapse file tree 1 file changed +55
-0
lines changed Expand file tree Collapse file tree 1 file changed +55
-0
lines changed Original file line number Diff line number Diff line change
1
+ # This workflow will install Python dependencies, run tests and lint with a single version of Python
2
+ # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
3
+
4
+ name : access-parsers
5
+
6
+ on :
7
+ push :
8
+ branches : [ "main" ]
9
+ pull_request :
10
+ branches : [ "main" ]
11
+
12
+ permissions :
13
+ contents : read
14
+
15
+ jobs :
16
+ formatting :
17
+ runs-on : ubuntu-latest
18
+ steps :
19
+ - uses : actions/checkout@v3
20
+ - name : Code formatting
21
+ uses : psf/black@stable
22
+ with :
23
+ options : " --check --verbose --diff"
24
+ src : " ./src ./tests"
25
+
26
+ build :
27
+ needs : formatting
28
+ runs-on : ubuntu-latest
29
+ strategy :
30
+ matrix :
31
+ python-version : ['3.10', '3.11', '3.12']
32
+
33
+ steps :
34
+ - uses : actions/checkout@v3
35
+ - name : Set up Python ${{ matrix.python-version }}
36
+ uses : actions/setup-python@v3
37
+ with :
38
+ python-version : ${{ matrix.python-version }}
39
+ - name : Install dependencies
40
+ run : |
41
+ python -m pip install --upgrade pip
42
+ pip install '.[devel,test]'
43
+ - name : Lint with flake8
44
+ run : |
45
+ # stop the build if there are Python syntax errors or undefined names
46
+ flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
47
+ # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
48
+ flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
49
+ - name : Test with pytest
50
+ run : |
51
+ python -m pytest
52
+ - name : Upload coverage reports to Codecov with GitHub Action
53
+ uses : codecov/codecov-action@v5
54
+ with :
55
+ token : ${{ secrets.CODECOV_TOKEN }}
You can’t perform that action at this time.
0 commit comments