Skip to content

Commit 554e736

Browse files
authored
ci: merge main to release
2 parents 32bb4ef + 3400d12 commit 554e736

113 files changed

Lines changed: 9246 additions & 10724 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/build-base-app.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
packages: write
1818

1919
steps:
20-
- uses: actions/checkout@v3
20+
- uses: actions/checkout@v4
2121

2222
- name: Set up QEMU
2323
uses: docker/setup-qemu-action@v2

.github/workflows/build-celery-worker.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
packages: write
2020

2121
steps:
22-
- uses: actions/checkout@v3
22+
- uses: actions/checkout@v4
2323

2424
- name: Set up QEMU
2525
uses: docker/setup-qemu-action@v2

.github/workflows/build-mq-broker.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
packages: write
1919

2020
steps:
21-
- uses: actions/checkout@v3
21+
- uses: actions/checkout@v4
2222

2323
- name: Set up QEMU
2424
uses: docker/setup-qemu-action@v2

.github/workflows/build.yml

Lines changed: 11 additions & 160 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252
to_tag: ${{ steps.semver.outputs.current }}
5353

5454
steps:
55-
- uses: actions/checkout@v3
55+
- uses: actions/checkout@v4
5656
with:
5757
fetch-depth: 0
5858

@@ -100,171 +100,22 @@ jobs:
100100
# -----------------------------------------------------------------
101101
# TESTS
102102
# -----------------------------------------------------------------
103-
tests-python:
104-
name: Run Tests (Python)
103+
104+
tests:
105+
name: Run Tests
106+
uses: ./.github/workflows/tests.yml
105107
if: ${{ github.event.inputs.skiptests == 'false' || github.ref_name == 'release' }}
106108
needs: [prepare]
107-
runs-on: ubuntu-latest
108-
container: ghcr.io/ietf-tools/datatracker-app-base:latest
109-
110-
services:
111-
db:
112-
image: ghcr.io/ietf-tools/datatracker-db:latest
113-
114-
steps:
115-
- uses: actions/checkout@v3
116-
117-
- name: Prepare for tests
118-
run: |
119-
chmod +x ./dev/tests/prepare.sh
120-
sh ./dev/tests/prepare.sh
121-
122-
- name: Ensure DB is ready
123-
run: |
124-
/usr/local/bin/wait-for db:5432 -- echo "DB ready"
125-
126-
- name: Run all tests
127-
shell: bash
128-
run: |
129-
echo "Running checks..."
130-
./ietf/manage.py check
131-
./ietf/manage.py migrate --fake-initial
132-
echo "Validating migrations..."
133-
if ! ( ietf/manage.py makemigrations --dry-run --check --verbosity 3 ) ; then
134-
echo "Model changes without migrations found."
135-
exit 1
136-
fi
137-
echo "Running tests..."
138-
if [[ "x${{ github.event.inputs.ignoreLowerCoverage }}" == "xtrue" ]]; then
139-
echo "Lower coverage failures will be ignored."
140-
./ietf/manage.py test --validate-html-harder --settings=settings_test --ignore-lower-coverage
141-
else
142-
./ietf/manage.py test --validate-html-harder --settings=settings_test
143-
fi
144-
coverage xml
145-
146-
- name: Upload Coverage Results to Codecov
147-
uses: codecov/codecov-action@v3.1.4
148-
with:
149-
files: coverage.xml
150-
151-
- name: Convert Coverage Results
152-
if: ${{ always() }}
153-
run: |
154-
mv latest-coverage.json coverage.json
155-
156-
- name: Upload Coverage Results as Build Artifact
157-
uses: actions/upload-artifact@v3
158-
if: ${{ always() }}
159-
with:
160-
name: coverage
161-
path: coverage.json
162-
163-
tests-playwright:
164-
name: Run Tests (Playwright)
165-
if: ${{ github.event.inputs.skiptests == 'false' || github.ref_name == 'release' }}
166-
needs: [prepare]
167-
runs-on: macos-latest
168-
strategy:
169-
fail-fast: false
170-
matrix:
171-
project: [chromium, firefox]
172-
173-
steps:
174-
- uses: actions/checkout@v3
175-
176-
- uses: actions/setup-node@v3
177-
with:
178-
node-version: '18'
179-
180-
- name: Run all tests
181-
run: |
182-
echo "Installing dependencies..."
183-
yarn
184-
echo "Installing Playwright..."
185-
cd playwright
186-
mkdir test-results
187-
npm ci
188-
npx playwright install --with-deps ${{ matrix.project }}
189-
echo "Running tests..."
190-
npx playwright test --project=${{ matrix.project }}
191-
192-
- name: Upload Report
193-
uses: actions/upload-artifact@v3
194-
if: ${{ always() }}
195-
continue-on-error: true
196-
with:
197-
name: playwright-results-${{ matrix.project }}
198-
path: playwright/test-results/
199-
if-no-files-found: ignore
200-
201-
tests-playwright-legacy:
202-
name: Run Tests (Playwright Legacy)
203-
if: ${{ github.event.inputs.skiptests == 'false' || github.ref_name == 'release' }}
204-
needs: [prepare]
205-
runs-on: ubuntu-latest
206-
container: ghcr.io/ietf-tools/datatracker-app-base:latest
207-
strategy:
208-
fail-fast: false
209-
matrix:
210-
project: [chromium, firefox]
211-
212-
services:
213-
db:
214-
image: ghcr.io/ietf-tools/datatracker-db:latest
215-
216-
steps:
217-
- uses: actions/checkout@v3
218-
219-
- name: Prepare for tests
220-
run: |
221-
chmod +x ./dev/tests/prepare.sh
222-
sh ./dev/tests/prepare.sh
223-
224-
- name: Ensure DB is ready
225-
run: |
226-
/usr/local/bin/wait-for db:5432 -- echo "DB ready"
227-
228-
- name: Start Datatracker
229-
run: |
230-
echo "Running checks..."
231-
./ietf/manage.py check
232-
echo "Starting datatracker..."
233-
./ietf/manage.py runserver 0.0.0.0:8000 --settings=settings_local &
234-
echo "Waiting for datatracker to be ready..."
235-
/usr/local/bin/wait-for localhost:8000 -- echo "Datatracker ready"
109+
with:
110+
ignoreLowerCoverage: ${{ github.event.inputs.ignoreLowerCoverage == 'true' }}
236111

237-
- name: Run all tests
238-
env:
239-
# Required to get firefox to run as root:
240-
HOME: ""
241-
run: |
242-
echo "Installing dependencies..."
243-
yarn
244-
echo "Installing Playwright..."
245-
cd playwright
246-
mkdir test-results
247-
npm ci
248-
npx playwright install --with-deps ${{ matrix.project }}
249-
echo "Running tests..."
250-
npx playwright test --project=${{ matrix.project }} -c playwright-legacy.config.js
251-
252-
- name: Upload Report
253-
uses: actions/upload-artifact@v3
254-
if: ${{ always() }}
255-
continue-on-error: true
256-
with:
257-
name: playwright-legacy-results-${{ matrix.project }}
258-
path: playwright/test-results/
259-
if-no-files-found: ignore
260-
261112
# -----------------------------------------------------------------
262113
# RELEASE
263114
# -----------------------------------------------------------------
264115
release:
265116
name: Make Release
266117
if: ${{ !failure() && !cancelled() }}
267-
needs: [tests-python, tests-playwright, tests-playwright-legacy, prepare]
118+
needs: [tests, prepare]
268119
runs-on: ubuntu-latest
269120
env:
270121
SHOULD_DEPLOY: ${{needs.prepare.outputs.should_deploy}}
@@ -273,7 +124,7 @@ jobs:
273124
TO_TAG: ${{needs.prepare.outputs.to_tag}}
274125

275126
steps:
276-
- uses: actions/checkout@v3
127+
- uses: actions/checkout@v4
277128
with:
278129
fetch-depth: 0
279130

@@ -389,7 +240,7 @@ jobs:
389240
notify:
390241
name: Notify
391242
if: ${{ always() }}
392-
needs: [prepare, tests-python, tests-playwright, tests-playwright-legacy, release]
243+
needs: [prepare, tests, release]
393244
runs-on: ubuntu-latest
394245
env:
395246
PKG_VERSION: ${{needs.prepare.outputs.pkg_version}}
@@ -456,7 +307,7 @@ jobs:
456307
PKG_VERSION: ${{needs.prepare.outputs.pkg_version}}
457308

458309
steps:
459-
- uses: actions/checkout@v3
310+
- uses: actions/checkout@v4
460311

461312
- name: Download a Release Artifact
462313
uses: actions/download-artifact@v3.0.2

0 commit comments

Comments
 (0)