Merge remote-tracking branch 'upstream/main' into feat/postgres

This commit is contained in:
Robert Sparks 2022-11-30 16:35:33 -06:00
commit abe640e57f
No known key found for this signature in database
GPG key ID: 6E2A6A5775F91318
389 changed files with 7662 additions and 5460 deletions

View file

@ -72,6 +72,7 @@
"vue.volar",
"mrmlnc.vscode-duplicate",
"ms-azuretools.vscode-docker",
"ms-playwright.playwright",
"ms-python.python",
"ms-python.vscode-pylance",
"mtxr.sqltools-driver-mysql",

View file

@ -11,7 +11,7 @@ services:
- /workspace/.vite
- /workspace/.yarn/unplugged
- app-assets:/assets
- datatracker-vscode-ext:/root/.vscode-server/extensions
# - datatracker-vscode-ext:/root/.vscode-server/extensions
# Runs app on the same network as the database container, allows "forwardPorts" in devcontainer.json function.
network_mode: service:db

View file

@ -9,8 +9,7 @@ module.exports = {
},
extends: [
// 'plugin:vue/vue3-essential', // Priority A: Essential (Error Prevention)
'plugin:vue/vue3-strongly-recommended', // Priority B: Strongly Recommended (Improving Readability)
'plugin:cypress/recommended'
'plugin:vue/vue3-strongly-recommended' // Priority B: Strongly Recommended (Improving Readability)
],
globals: {
d3: true

View file

@ -14,6 +14,7 @@ on:
default: ''
publish:
description: 'Create Production Release'
default: false
required: true
type: boolean
sandbox:
@ -23,6 +24,7 @@ on:
type: boolean
skiptests:
description: 'Skip Tests'
default: false
required: true
type: boolean
ignoreLowerCoverage:
@ -37,6 +39,7 @@ on:
type: boolean
dryrun:
description: 'Dry Run'
default: false
required: true
type: boolean
@ -50,6 +53,8 @@ jobs:
outputs:
should_deploy: ${{ steps.buildvars.outputs.should_deploy }}
pkg_version: ${{ steps.buildvars.outputs.pkg_version }}
from_tag: ${{ steps.semver.outputs.nextStrict }}
to_tag: ${{ steps.semver.outputs.current }}
steps:
- uses: actions/checkout@v3
@ -68,6 +73,7 @@ jobs:
with:
token: ${{ github.token }}
branch: main
skipInvalidTags: true
- name: Set Next Version Env Var
if: ${{ github.event.inputs.publish == 'true' || github.event.inputs.dryrun == 'true' }}
@ -144,8 +150,6 @@ jobs:
run: |
echo "Running checks..."
./ietf/manage.py check
./ietf/manage.py migrate || true
echo "USE_TZ = True" >> ./ietf/settings_local.py
./ietf/manage.py migrate
echo "Validating migrations..."
if ! ( ietf/manage.py makemigrations --dry-run --check --verbosity 3 ) ; then
@ -216,12 +220,16 @@ jobs:
path: playwright/test-results/
if-no-files-found: ignore
tests-cypress:
name: Run Tests (Cypress)
tests-playwright-legacy:
name: Run Tests (Playwright Legacy)
if: ${{ github.event.inputs.skiptests == 'false' }}
needs: [prepare]
runs-on: ubuntu-latest
container: ghcr.io/ietf-tools/datatracker-app-base:latest
strategy:
fail-fast: false
matrix:
project: [chromium, firefox]
services:
db:
@ -256,26 +264,27 @@ jobs:
/usr/local/bin/wait-for localhost:8000 -- echo "Datatracker ready"
- name: Run all tests
env:
# Required to get firefox to run as root:
HOME: ""
run: |
echo "Installing dependencies..."
yarn
echo "Installing Playwright..."
cd playwright
mkdir test-results
npm ci
npx playwright install --with-deps ${{ matrix.project }}
echo "Running tests..."
yarn cypress:legacy
npx playwright test --project=${{ matrix.project }} -c playwright-legacy.config.js
- name: Upload Video Recordings
- name: Upload Report
uses: actions/upload-artifact@v3
if: ${{ always() }}
continue-on-error: true
with:
name: videos-legacy
path: cypress/videos/
if-no-files-found: ignore
- name: Upload Screenshots
uses: actions/upload-artifact@v3
if: ${{ always() }}
continue-on-error: true
with:
name: screenshots-modern
path: cypress/screenshots/
name: playwright-legacy-results-${{ matrix.project }}
path: playwright/test-results/
if-no-files-found: ignore
# -----------------------------------------------------------------
@ -284,11 +293,13 @@ jobs:
release:
name: Make Release
if: ${{ always() }}
needs: [tests-python, tests-playwright, tests-cypress, prepare]
needs: [tests-python, tests-playwright, tests-playwright-legacy, prepare]
runs-on: ubuntu-latest
env:
SHOULD_DEPLOY: ${{needs.prepare.outputs.should_deploy}}
PKG_VERSION: ${{needs.prepare.outputs.pkg_version}}
FROM_TAG: ${{needs.prepare.outputs.from_tag}}
TO_TAG: ${{needs.prepare.outputs.to_tag}}
steps:
- uses: actions/checkout@v3
@ -346,7 +357,8 @@ jobs:
if: ${{ env.SHOULD_DEPLOY == 'true' && github.event.inputs.dryrun == 'false' }}
with:
token: ${{ github.token }}
tag: ${{ env.PKG_VERSION }}
fromTag: ${{ env.FROM_TAG }}
toTag: ${{ env.TO_TAG }}
writeToFile: false
- name: Prepare Coverage Action

View file

@ -6,7 +6,9 @@ on:
- 'main'
- 'feat/tzaware'
paths:
- 'client/**'
- 'ietf/**'
- 'playwright/**'
- 'requirements.txt'
- 'package.json'
@ -43,10 +45,6 @@ jobs:
run: |
echo "Running checks..."
./ietf/manage.py check
echo "Running migrations with USE_TZ=False..."
./ietf/manage.py migrate || true
echo "USE_TZ = True" >> ./ietf/settings_local.py
echo "Running migrations with USE_TZ=True..."
./ietf/manage.py migrate
echo "Validating migrations..."
if ! ( ietf/manage.py makemigrations --dry-run --check --verbosity 3 ) ; then
@ -110,3 +108,68 @@ jobs:
name: playwright-results-${{ matrix.project }}
path: playwright/test-results/
if-no-files-found: ignore
tests-playwright-legacy:
name: Run Tests (Playwright Legacy)
runs-on: ubuntu-latest
container: ghcr.io/ietf-tools/datatracker-app-base:latest
strategy:
fail-fast: false
matrix:
project: [chromium, firefox]
services:
db:
image: ghcr.io/ietf-tools/datatracker-db:latest
volumes:
- mariadb-data:/var/lib/mysql
env:
MYSQL_ROOT_PASSWORD: ietf
MYSQL_DATABASE: ietf_utf8
MYSQL_USER: django
MYSQL_PASSWORD: RkTkDPFnKpko
steps:
- uses: actions/checkout@v3
- name: Prepare for tests
run: |
chmod +x ./dev/tests/prepare.sh
sh ./dev/tests/prepare.sh
- name: Ensure DB is ready
run: |
/usr/local/bin/wait-for db:3306 -- echo "DB ready"
- name: Start Datatracker
run: |
echo "Running checks..."
./ietf/manage.py check
echo "Starting datatracker..."
./ietf/manage.py runserver 0.0.0.0:8000 --settings=settings_local &
echo "Waiting for datatracker to be ready..."
/usr/local/bin/wait-for localhost:8000 -- echo "Datatracker ready"
- name: Run all tests
env:
# Required to get firefox to run as root:
HOME: ""
run: |
echo "Installing dependencies..."
yarn
echo "Installing Playwright..."
cd playwright
mkdir test-results
npm ci
npx playwright install --with-deps ${{ matrix.project }}
echo "Running tests..."
npx playwright test --project=${{ matrix.project }} -c playwright-legacy.config.js
- name: Upload Report
uses: actions/upload-artifact@v3
if: ${{ always() }}
continue-on-error: true
with:
name: playwright-legacy-results-${{ matrix.project }}
path: playwright/test-results/
if-no-files-found: ignore

View file

@ -40,7 +40,7 @@ jobs:
- platform: "linux/amd64"
docker: "x64"
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
@ -71,11 +71,11 @@ jobs:
permissions:
packages: write
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Get Current Date as Tag
id: date
run: echo "::set-output name=date::$(date +'%Y%m%d')"
run: echo "date=$(date +'%Y%m%d')" >> $GITHUB_OUTPUT
- name: Login to GitHub Container Registry
uses: docker/login-action@v2

View file

@ -16,7 +16,7 @@ jobs:
action:
runs-on: ubuntu-latest
steps:
- uses: dessant/lock-threads@v3
- uses: ietf-tools/lock-threads@v3.1.1
with:
github-token: ${{ github.token }}
issue-inactive-days: 7

3106
.pnp.cjs generated

File diff suppressed because it is too large Load diff

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show more