|
1 | 1 | --- |
2 | | - |
3 | 2 | name: Django Flat JSON Widget CI Build |
4 | 3 |
|
5 | 4 | on: |
|
11 | 10 | - master |
12 | 11 |
|
13 | 12 | jobs: |
14 | | - |
15 | 13 | build: |
16 | 14 | name: Python==${{ matrix.python-version }} | ${{ matrix.django-version }} |
17 | 15 | runs-on: ubuntu-24.04 |
@@ -40,70 +38,70 @@ jobs: |
40 | 38 | django-version: django~=4.2.0 |
41 | 39 |
|
42 | 40 | steps: |
43 | | - - uses: actions/checkout@v4 |
44 | | - with: |
45 | | - ref: ${{ github.event.pull_request.head.sha }} |
| 41 | + - uses: actions/checkout@v4 |
| 42 | + with: |
| 43 | + ref: ${{ github.event.pull_request.head.sha }} |
46 | 44 |
|
47 | | - - name: Cache APT packages |
48 | | - uses: actions/cache@v4 |
49 | | - with: |
50 | | - path: /var/cache/apt/archives |
51 | | - key: apt-${{ runner.os }}-${{ hashFiles('.github/workflows/ci.yml') }} |
52 | | - restore-keys: | |
53 | | - apt-${{ runner.os }}- |
| 45 | + - name: Cache APT packages |
| 46 | + uses: actions/cache@v4 |
| 47 | + with: |
| 48 | + path: /var/cache/apt/archives |
| 49 | + key: apt-${{ runner.os }}-${{ hashFiles('.github/workflows/ci.yml') }} |
| 50 | + restore-keys: | |
| 51 | + apt-${{ runner.os }}- |
54 | 52 |
|
55 | | - - name: Disable man page auto-update |
56 | | - run: | |
57 | | - echo 'set man-db/auto-update false' | sudo debconf-communicate >/dev/null |
58 | | - sudo dpkg-reconfigure man-db |
| 53 | + - name: Disable man page auto-update |
| 54 | + run: | |
| 55 | + echo 'set man-db/auto-update false' | sudo debconf-communicate >/dev/null |
| 56 | + sudo dpkg-reconfigure man-db |
59 | 57 |
|
60 | | - - name: Set up Python ${{ matrix.python-version }} |
61 | | - uses: actions/setup-python@v5 |
62 | | - with: |
63 | | - python-version: ${{ matrix.python-version }} |
64 | | - cache: 'pip' |
65 | | - cache-dependency-path: | |
66 | | - setup.py |
| 58 | + - name: Set up Python ${{ matrix.python-version }} |
| 59 | + uses: actions/setup-python@v5 |
| 60 | + with: |
| 61 | + python-version: ${{ matrix.python-version }} |
| 62 | + cache: "pip" |
| 63 | + cache-dependency-path: | |
| 64 | + setup.py |
67 | 65 |
|
68 | | - - name: Install Dependencies |
69 | | - id: deps |
70 | | - run: | |
71 | | - pip install -U pip wheel setuptools |
72 | | - pip install -U -e .[test] |
73 | | - pip install ${{ matrix.django-version }} |
74 | | - sudo npm install -g prettier |
| 66 | + - name: Install Dependencies |
| 67 | + id: deps |
| 68 | + run: | |
| 69 | + pip install -U pip wheel setuptools |
| 70 | + pip install -U -e .[test] |
| 71 | + pip install ${{ matrix.django-version }} |
| 72 | + sudo npm install -g prettier |
75 | 73 |
|
76 | | - - name: QA checks |
77 | | - run: | |
78 | | - ./run-qa-checks |
| 74 | + - name: QA checks |
| 75 | + run: | |
| 76 | + ./run-qa-checks |
79 | 77 |
|
80 | | - - name: Tests |
81 | | - if: ${{ !cancelled() && steps.deps.conclusion == 'success' }} |
82 | | - run: | |
83 | | - coverage run runtests.py |
84 | | - coverage xml |
85 | | - env: |
86 | | - SELENIUM_HEADLESS: 1 |
87 | | - GECKO_LOG: 1 |
| 78 | + - name: Tests |
| 79 | + if: ${{ !cancelled() && steps.deps.conclusion == 'success' }} |
| 80 | + run: | |
| 81 | + coverage run runtests.py |
| 82 | + coverage xml |
| 83 | + env: |
| 84 | + SELENIUM_HEADLESS: 1 |
| 85 | + GECKO_LOG: 1 |
88 | 86 |
|
89 | | - - name: Show gecko web driver log on failures |
90 | | - if: ${{ failure() }} |
91 | | - run: cat geckodriver.log |
| 87 | + - name: Show gecko web driver log on failures |
| 88 | + if: ${{ failure() }} |
| 89 | + run: cat geckodriver.log |
92 | 90 |
|
93 | | - - name: Upload Coverage |
94 | | - if: ${{ success() }} |
95 | | - uses: coverallsapp/github-action@v2 |
96 | | - with: |
97 | | - parallel: true |
98 | | - format: cobertura |
99 | | - flag-name: python-${{ matrix.env.env }} |
100 | | - github-token: ${{ secrets.GITHUB_TOKEN }} |
| 91 | + - name: Upload Coverage |
| 92 | + if: ${{ success() }} |
| 93 | + uses: coverallsapp/github-action@v2 |
| 94 | + with: |
| 95 | + parallel: true |
| 96 | + format: cobertura |
| 97 | + flag-name: python-${{ matrix.env.env }} |
| 98 | + github-token: ${{ secrets.GITHUB_TOKEN }} |
101 | 99 |
|
102 | 100 | coveralls: |
103 | 101 | needs: build |
104 | 102 | runs-on: ubuntu-latest |
105 | 103 | steps: |
106 | | - - name: Coveralls Finished |
107 | | - uses: coverallsapp/github-action@v2 |
108 | | - with: |
109 | | - parallel-finished: true |
| 104 | + - name: Coveralls Finished |
| 105 | + uses: coverallsapp/github-action@v2 |
| 106 | + with: |
| 107 | + parallel-finished: true |
0 commit comments