##// END OF EJS Templates
Upgrade GitHub Actions
Christian Clauss -
Show More
@@ -1,40 +1,36 b''
1 # This workflow will install Python dependencies, run tests and lint with a variety of Python versions
1 # This workflow will install Python dependencies, run tests and lint with a variety of Python versions
2 # For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
2 # For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
3
3
4 name: Python package
4 name: Python package
5
5
6 on:
6 on:
7 push:
7 push:
8 branches: [ main, 7.x ]
8 branches: [ main, 7.x ]
9 pull_request:
9 pull_request:
10 branches: [ main, 7.x ]
10 branches: [ main, 7.x ]
11
11
12 jobs:
12 jobs:
13 formatting:
13 formatting:
14
14
15 runs-on: ubuntu-latest
15 runs-on: ubuntu-latest
16 timeout-minutes: 5
16 timeout-minutes: 5
17 strategy:
18 matrix:
19 python-version: [3.8]
20
21 steps:
17 steps:
22 - uses: actions/checkout@v2
18 - uses: actions/checkout@v3
23 with:
19 with:
24 fetch-depth: 0
20 fetch-depth: 0
25 - name: Set up Python ${{ matrix.python-version }}
21 - name: Set up Python
26 uses: actions/setup-python@v2
22 uses: actions/setup-python@v4
27 with:
23 with:
28 python-version: ${{ matrix.python-version }}
24 python-version: 3.x
29 - name: Install dependencies
25 - name: Install dependencies
30 run: |
26 run: |
31 python -m pip install --upgrade pip
27 python -m pip install --upgrade pip
32 pip install darker black==21.12b0
28 pip install darker black==21.12b0
33 - name: Lint with darker
29 - name: Lint with darker
34 run: |
30 run: |
35 darker -r 60625f241f298b5039cb2debc365db38aa7bb522 --check --diff . || (
31 darker -r 60625f241f298b5039cb2debc365db38aa7bb522 --check --diff . || (
36 echo "Changes need auto-formatting. Run:"
32 echo "Changes need auto-formatting. Run:"
37 echo " darker -r 60625f241f298b5039cb2debc365db38aa7bb522"
33 echo " darker -r 60625f241f298b5039cb2debc365db38aa7bb522"
38 echo "then commit and push changes to fix."
34 echo "then commit and push changes to fix."
39 exit 1
35 exit 1
40 )
36 )
General Comments 0
You need to be logged in to leave comments. Login now