Skip to content

Commit

Permalink
Merge branch 'main' into dmrotransforms
Browse files Browse the repository at this point in the history
  • Loading branch information
wbamberg authored Jan 23, 2025
2 parents 2d3f23d + 8c47156 commit b30ec5c
Show file tree
Hide file tree
Showing 479 changed files with 21,835 additions and 2,030 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/pr-check-lint_content.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,14 @@ jobs:
echo "DIFF_DOCUMENTS=${DIFF_DOCUMENTS}" >> $GITHUB_ENV
- name: Checkout HEAD
if: ${{ env.DIFF_DOCUMENTS }}
if: env.DIFF_DOCUMENTS
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
path: pr_head

- name: Get changed content from HEAD
if: ${{ env.DIFF_DOCUMENTS }}
if: env.DIFF_DOCUMENTS
run: |
git config --global user.email "[email protected]"
git config --global user.name "mdn-bot"
Expand All @@ -62,21 +62,21 @@ jobs:
git commit -m "Code from PR head"
- name: Setup Node.js environment
if: ${{ env.DIFF_DOCUMENTS }}
if: env.DIFF_DOCUMENTS
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
cache: yarn

- name: Install all yarn packages
if: ${{ env.DIFF_DOCUMENTS }}
if: env.DIFF_DOCUMENTS
run: yarn --frozen-lockfile
env:
# https://github.com/microsoft/vscode-ripgrep#github-api-limit-note
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Lint and format markdown files
if: ${{ env.DIFF_DOCUMENTS }}
if: env.DIFF_DOCUMENTS
run: |
# Generate random delimiter
# https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#multiline-strings
Expand Down Expand Up @@ -120,13 +120,13 @@ jobs:
git diff
- name: Setup reviewdog
if: ${{ env.FILES_MODIFIED == 'true' || env.MD_LINT_FAILED == 'true' }}
if: env.FILES_MODIFIED == 'true' || env.MD_LINT_FAILED == 'true'
uses: reviewdog/action-setup@v1
with:
reviewdog_version: latest

- name: Suggest changes using diff
if: ${{ env.FILES_MODIFIED == 'true' }}
if: env.FILES_MODIFIED == 'true'
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
Expand All @@ -141,7 +141,7 @@ jobs:
-reporter=github-pr-review < "${TMPFILE}"
- name: Add reviews for markdownlint errors
if: ${{ env.MD_LINT_FAILED == 'true' }}
if: env.MD_LINT_FAILED == 'true'
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
Expand All @@ -154,7 +154,7 @@ jobs:
-reporter="github-pr-review"
- name: Fail if any issues pending
if: ${{ env.FILES_MODIFIED == 'true' || env.MD_LINT_FAILED == 'true' || env.FM_LINT_FAILED == 'true' }}
if: env.FILES_MODIFIED == 'true' || env.MD_LINT_FAILED == 'true' || env.FM_LINT_FAILED == 'true'
env:
MD_LINT_FAILED: ${{ env.MD_LINT_FAILED }}
FM_LINT_FAILED: ${{ env.FM_LINT_FAILED }}
Expand Down
22 changes: 11 additions & 11 deletions .github/workflows/pr-review-companion.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ name: PR review companion

on:
workflow_run:
workflows: ["PR Test", "PR Test - new CI"]
workflows: ["PR Test", "PR Test Legacy"]
types:
- completed

jobs:
review:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
if: github.event.workflow_run.conclusion == 'success'
steps:
- name: "Download artifact"
uses: actions/download-artifact@v4
Expand All @@ -26,26 +26,26 @@ jobs:
run-id: ${{ github.event.workflow_run.id }}

- name: Check for artifacts
if: ${{ hashFiles('build/') != '' }}
if: hashFiles('build/') != ''
run: |
echo "HAS_ARTIFACT=true" >> "$GITHUB_ENV"
- uses: actions/checkout@v4
if: ${{ env.HAS_ARTIFACT }}
if: env.HAS_ARTIFACT
with:
repository: mdn/yari
path: yari

- name: Install Python
if: ${{ env.HAS_ARTIFACT }}
if: env.HAS_ARTIFACT
id: setup-python
uses: actions/setup-python@v5
with:
python-version: "3.10"

# See https://www.peterbe.com/plog/install-python-poetry-github-actions-faster
- name: Load cached ~/.local
if: ${{ env.HAS_ARTIFACT }}
if: env.HAS_ARTIFACT
uses: actions/cache@v4
with:
path: ~/.local
Expand All @@ -54,14 +54,14 @@ jobs:
key: dotlocal-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-0

- name: Install Python poetry
if: ${{ env.HAS_ARTIFACT }}
if: env.HAS_ARTIFACT
uses: snok/[email protected]
with:
virtualenvs-create: true
virtualenvs-in-project: true

- name: Load cached venv
if: ${{ env.HAS_ARTIFACT }}
if: env.HAS_ARTIFACT
id: cached-poetry-dependencies
uses: actions/cache@v4
with:
Expand All @@ -71,19 +71,19 @@ jobs:
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}-${{ steps.setup-python.outputs.python-version }}-0

- name: Install poetry dependencies
if: ${{ env.HAS_ARTIFACT && steps.cached-poetry-dependencies.outputs.cache-hit != 'true' }}
if: env.HAS_ARTIFACT && steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: |
cd yari/deployer
poetry install --no-interaction --no-root
- name: Install Deployer
if: ${{ env.HAS_ARTIFACT }}
if: env.HAS_ARTIFACT
run: |
cd yari/deployer
poetry install --no-interaction
- name: Deploy and analyze built content
if: ${{ env.HAS_ARTIFACT }}
if: env.HAS_ARTIFACT
env:
BUILD_OUT_ROOT: ${{ github.workspace }}/build

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# This way, if the tests passed, you'll be able to review the built
# pages on a public URL.

name: PR Test - new CI
name: PR Test Legacy

on:
pull_request:
Expand All @@ -13,7 +13,7 @@ on:

jobs:
tests:
if: github.repository == 'mdn/content' && startsWith(github.event.pull_request.title, '[new-ci]')
if: github.repository == 'mdn/content'
runs-on: ubuntu-latest
# Set the permissions to `read-all`, preventing the workflow from
# any accidental write access to the repository.
Expand Down Expand Up @@ -48,22 +48,22 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Setup Node.js environment
if: ${{ env.GIT_DIFF_CONTENT }} || ${{ env.GIT_DIFF_FILES }}
if: env.GIT_DIFF_CONTENT || env.GIT_DIFF_FILES
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
cache: yarn

- name: Install all yarn packages
if: ${{ env.GIT_DIFF_CONTENT }} || ${{ env.GIT_DIFF_FILES }}
if: env.GIT_DIFF_CONTENT || env.GIT_DIFF_FILES
run: yarn --frozen-lockfile
env:
# https://github.com/microsoft/vscode-ripgrep#github-api-limit-note
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Build changed content
id: build-content
if: ${{ env.GIT_DIFF_CONTENT }}
if: env.GIT_DIFF_CONTENT
env:
CONTENT_ROOT: ${{ github.workspace }}/files

Expand Down Expand Up @@ -92,19 +92,12 @@ jobs:
# Playground
REACT_APP_PLAYGROUND_BASE_HOST: mdnyalp.dev

# rari
LIVE_SAMPLES_BASE_URL: https://live.mdnyalp.dev
INTERACTIVE_EXAMPLES_BASE_URL: https://interactive-examples.mdn.allizom.net

run: |
# The reason this script isn't in `package.json` is because
# you don't need that script as a writer. It's only used in CI
# and it can't use the default CONTENT_ROOT that gets set in
# package.json.
echo Y|yarn rari update
ARGS=$(echo $GIT_DIFF_CONTENT | sed -E -e "s#(^| )files#\1-f $PWD/files#g")
yarn rari build --no-basic --json-issues --data-issues $ARGS
yarn yari-render-html
yarn build $GIT_DIFF_CONTENT
echo "Disk usage size of the build"
du -sh $BUILD_OUT_ROOT
Expand All @@ -119,21 +112,21 @@ jobs:
wget https://github.com/${{ github.repository }}/compare/${BASE_SHA}...${HEAD_SHA}.diff -O ${BUILD_OUT_ROOT}/DIFF
- name: Merge static assets with built documents
if: ${{ env.GIT_DIFF_CONTENT }}
if: env.GIT_DIFF_CONTENT
run: |
# Exclude the .map files, as they're used for debugging JS and CSS.
rsync -a --exclude "*.map" node_modules/@mdn/yari/client/build/ $BUILD_OUT_ROOT
# Show the final disk usage size of the build.
du -sh $BUILD_OUT_ROOT
- uses: actions/upload-artifact@v4
if: ${{ env.GIT_DIFF_CONTENT }}
if: env.GIT_DIFF_CONTENT
with:
name: build
path: ${{ env.BUILD_OUT_ROOT }}

- name: Check changed files
if: ${{ env.GIT_DIFF_FILES }}
if: env.GIT_DIFF_FILES
run: |
echo $GIT_DIFF_FILES
Expand Down
23 changes: 15 additions & 8 deletions .github/workflows/pr-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on:

jobs:
tests:
if: github.repository == 'mdn/content' && !startsWith(github.event.pull_request.title, '[new-ci]')
if: github.repository == 'mdn/content'
runs-on: ubuntu-latest
# Set the permissions to `read-all`, preventing the workflow from
# any accidental write access to the repository.
Expand Down Expand Up @@ -48,22 +48,22 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Setup Node.js environment
if: ${{ env.GIT_DIFF_CONTENT }} || ${{ env.GIT_DIFF_FILES }}
if: env.GIT_DIFF_CONTENT || env.GIT_DIFF_FILES
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
cache: yarn

- name: Install all yarn packages
if: ${{ env.GIT_DIFF_CONTENT }} || ${{ env.GIT_DIFF_FILES }}
if: env.GIT_DIFF_CONTENT || env.GIT_DIFF_FILES
run: yarn --frozen-lockfile
env:
# https://github.com/microsoft/vscode-ripgrep#github-api-limit-note
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Build changed content
id: build-content
if: ${{ env.GIT_DIFF_CONTENT }}
if: env.GIT_DIFF_CONTENT
env:
CONTENT_ROOT: ${{ github.workspace }}/files

Expand Down Expand Up @@ -92,12 +92,19 @@ jobs:
# Playground
REACT_APP_PLAYGROUND_BASE_HOST: mdnyalp.dev

# rari
LIVE_SAMPLES_BASE_URL: https://live.mdnyalp.dev
INTERACTIVE_EXAMPLES_BASE_URL: https://interactive-examples.mdn.allizom.net

run: |
# The reason this script isn't in `package.json` is because
# you don't need that script as a writer. It's only used in CI
# and it can't use the default CONTENT_ROOT that gets set in
# package.json.
yarn build $GIT_DIFF_CONTENT
echo Y|yarn rari update
ARGS=$(echo $GIT_DIFF_CONTENT | sed -E -e "s#(^| )files#\1-f $PWD/files#g")
yarn rari build --no-basic --json-issues --data-issues $ARGS
yarn yari-render-html
echo "Disk usage size of the build"
du -sh $BUILD_OUT_ROOT
Expand All @@ -112,21 +119,21 @@ jobs:
wget https://github.com/${{ github.repository }}/compare/${BASE_SHA}...${HEAD_SHA}.diff -O ${BUILD_OUT_ROOT}/DIFF
- name: Merge static assets with built documents
if: ${{ env.GIT_DIFF_CONTENT }}
if: env.GIT_DIFF_CONTENT
run: |
# Exclude the .map files, as they're used for debugging JS and CSS.
rsync -a --exclude "*.map" node_modules/@mdn/yari/client/build/ $BUILD_OUT_ROOT
# Show the final disk usage size of the build.
du -sh $BUILD_OUT_ROOT
- uses: actions/upload-artifact@v4
if: ${{ env.GIT_DIFF_CONTENT }}
if: env.GIT_DIFF_CONTENT
with:
name: build
path: ${{ env.BUILD_OUT_ROOT }}

- name: Check changed files
if: ${{ env.GIT_DIFF_FILES }}
if: env.GIT_DIFF_FILES
run: |
echo $GIT_DIFF_FILES
Expand Down
5 changes: 5 additions & 0 deletions .vscode/dictionaries/ignore-list.txt
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,11 @@ dubby
Duden
dXNlcm5hbWU6cGFzc3dvcmQ
EACC
efregre
eirmod
elitr
ERHGDFy
ertgrth
esset
essum
Ethere
Expand Down Expand Up @@ -173,6 +175,7 @@ isnt
isoff
javascripts
jdoe
Jgfbgfdgt
jngl
jnglstore
js13kgames
Expand Down Expand Up @@ -253,6 +256,7 @@ rebum
regelialia
rheeeeet
ricebean
rtgtfghhyj
s3pPLMBiTxaQ9kYGzzhZRbK
sadipscing
sagnarelli
Expand Down Expand Up @@ -306,6 +310,7 @@ webglsamples
webvr
weta
Whereami
Whereshire
wisen
wisi
Wookie
Expand Down
2 changes: 2 additions & 0 deletions .vscode/dictionaries/proper-names.txt
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ Béziers
caitmuenster
Camino
Camtasia
Canva
Carakan
Cardano
carinaanand
Expand Down Expand Up @@ -567,6 +568,7 @@ Theora
Thierry
Tidwell
Tink
tinypng
Titilayo
Tokopedia
Tomayac
Expand Down
1 change: 1 addition & 0 deletions .vscode/dictionaries/terms-abbreviations.txt
Original file line number Diff line number Diff line change
Expand Up @@ -714,6 +714,7 @@ sundried
sunsetting
supercookie
superdomain
superpowered
superscaling
supersets
SVCB
Expand Down
Loading

0 comments on commit b30ec5c

Please sign in to comment.