Merge main
This commit is contained in:
2
.github/workflows/60-days-stale-check.yml
vendored
2
.github/workflows/60-days-stale-check.yml
vendored
@@ -17,4 +17,6 @@ jobs:
|
||||
only-labels: 'engineering'
|
||||
stale-issue-label: 'stale'
|
||||
stale-pr-label: 'stale'
|
||||
exempt-pr-labels: 'never-stale'
|
||||
exempt-issue-labels: 'never-stale'
|
||||
|
||||
|
||||
12
.github/workflows/browser-test.yml
vendored
12
.github/workflows/browser-test.yml
vendored
@@ -20,18 +20,22 @@ jobs:
|
||||
paths: '[".github/workflows/browser-test.yml","assets/**", "content/**", "data/**", "includes/**", "javascripts/**", "jest-puppeteer.config.js", "jest.config.js", "layouts/**", "lib/**", "middleware/**", "package-lock.json", "package.json", "server.js", "translations/**", "webpack.config.js"]'
|
||||
build:
|
||||
needs: see_if_should_skip
|
||||
if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
# Each of these ifs needs to be repeated at each step to make sure the required check still runs
|
||||
# Even if if doesn't do anything
|
||||
- if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
|
||||
name: Checkout
|
||||
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
|
||||
|
||||
- name: Install
|
||||
- if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
|
||||
name: Install
|
||||
uses: ianwalter/puppeteer@12728ddef82390d1ecd4732fb543f62177392fbb
|
||||
with:
|
||||
args: npm ci
|
||||
|
||||
- name: Test
|
||||
- if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
|
||||
name: Test
|
||||
uses: ianwalter/puppeteer@12728ddef82390d1ecd4732fb543f62177392fbb
|
||||
with:
|
||||
args: npm run browser-test
|
||||
|
||||
16
.github/workflows/check-all-english-links.yml
vendored
16
.github/workflows/check-all-english-links.yml
vendored
@@ -1,6 +1,7 @@
|
||||
name: Check all English links
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: "40 19 * * *" # once a day at 19:40 UTC / 11:40 PST
|
||||
|
||||
@@ -16,17 +17,12 @@ jobs:
|
||||
- name: npm run build
|
||||
run: npm run build
|
||||
- name: Run script
|
||||
run: script/check-external-links en > broken_links.md
|
||||
- name: Check if any broken links
|
||||
run: script/check-english-links.js > broken_links.md
|
||||
- if: ${{ failure() }}
|
||||
name: Get title for issue
|
||||
id: check
|
||||
run: |
|
||||
if [ "$(grep 'All links are good' broken_links.md)" ]; then
|
||||
echo ::set-output name=continue::no
|
||||
else
|
||||
echo "::set-output name=continue::yes"
|
||||
echo "::set-output name=title::$(grep 'found on help.github.com' broken_links.md)"
|
||||
fi
|
||||
- if: ${{ steps.check.outputs.continue == 'yes' }}
|
||||
run: echo "::set-output name=title::$(head -1 broken_links.md)"
|
||||
- if: ${{ failure() }}
|
||||
name: Create issue from file
|
||||
uses: peter-evans/create-issue-from-file@35e304e2a12caac08c568247a2cb46ecd0c3ecc5
|
||||
with:
|
||||
|
||||
@@ -15,7 +15,7 @@ jobs:
|
||||
with:
|
||||
node-version: 14.x
|
||||
- name: cache node modules
|
||||
uses: actions/cache@d1255ad9362389eac595a9ae406b8e8cb3331f16
|
||||
uses: actions/cache@0781355a23dac32fd3bac414512f4b903437991a
|
||||
with:
|
||||
path: ~/.npm
|
||||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
||||
|
||||
2
.github/workflows/js-lint.yml
vendored
2
.github/workflows/js-lint.yml
vendored
@@ -42,7 +42,7 @@ jobs:
|
||||
echo "::set-output name=dir::$(npm config get cache)"
|
||||
|
||||
- name: Cache node modules
|
||||
uses: actions/cache@d1255ad9362389eac595a9ae406b8e8cb3331f16
|
||||
uses: actions/cache@0781355a23dac32fd3bac414512f4b903437991a
|
||||
with:
|
||||
path: ${{ steps.npm-cache.outputs.dir }}
|
||||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
||||
|
||||
2
.github/workflows/pa11y.yml
vendored
2
.github/workflows/pa11y.yml
vendored
@@ -16,7 +16,7 @@ jobs:
|
||||
echo "::set-output name=dir::$(npm config get cache)"
|
||||
|
||||
- name: Cache node modules
|
||||
uses: actions/cache@d1255ad9362389eac595a9ae406b8e8cb3331f16
|
||||
uses: actions/cache@0781355a23dac32fd3bac414512f4b903437991a
|
||||
with:
|
||||
path: ${{ steps.npm-cache.outputs.dir }}
|
||||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
||||
|
||||
27
.github/workflows/repo-freeze-check.yml
vendored
Normal file
27
.github/workflows/repo-freeze-check.yml
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
name: Repo Freeze Check
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types:
|
||||
- opened
|
||||
- reopened
|
||||
- synchronize
|
||||
- ready_for_review
|
||||
- unlocked
|
||||
branches:
|
||||
- main
|
||||
|
||||
env:
|
||||
FREEZE: ${{ secrets.FREEZE }}
|
||||
|
||||
jobs:
|
||||
check-freezer:
|
||||
name: Prevent merging during deployment freezes
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
||||
- name: Fail if repo merges are paused
|
||||
if: ${{ env.FREEZE == 'true' }}
|
||||
run: |
|
||||
echo 'Merges into the "main" branch on this repo are currently paused!'
|
||||
exit 1
|
||||
@@ -18,7 +18,7 @@ jobs:
|
||||
with:
|
||||
node-version: 14.x
|
||||
- name: cache node modules
|
||||
uses: actions/cache@d1255ad9362389eac595a9ae406b8e8cb3331f16
|
||||
uses: actions/cache@0781355a23dac32fd3bac414512f4b903437991a
|
||||
with:
|
||||
path: ~/.npm
|
||||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
||||
|
||||
4
.github/workflows/test-translations.yml
vendored
4
.github/workflows/test-translations.yml
vendored
@@ -27,7 +27,7 @@ jobs:
|
||||
echo "::set-output name=dir::$(npm config get cache)"
|
||||
|
||||
- name: Cache node modules
|
||||
uses: actions/cache@d1255ad9362389eac595a9ae406b8e8cb3331f16
|
||||
uses: actions/cache@0781355a23dac32fd3bac414512f4b903437991a
|
||||
with:
|
||||
path: ${{ steps.npm-cache.outputs.dir }}
|
||||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
||||
@@ -65,7 +65,7 @@ jobs:
|
||||
echo "::set-output name=dir::$(npm config get cache)"
|
||||
|
||||
- name: Cache node modules
|
||||
uses: actions/cache@d1255ad9362389eac595a9ae406b8e8cb3331f16
|
||||
uses: actions/cache@0781355a23dac32fd3bac414512f4b903437991a
|
||||
with:
|
||||
path: ${{ steps.npm-cache.outputs.dir }}
|
||||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
||||
|
||||
2
.github/workflows/test-windows.yml
vendored
2
.github/workflows/test-windows.yml
vendored
@@ -32,7 +32,7 @@ jobs:
|
||||
echo "::set-output name=dir::$(npm config get cache)"
|
||||
|
||||
- name: Cache node modules
|
||||
uses: actions/cache@d1255ad9362389eac595a9ae406b8e8cb3331f16
|
||||
uses: actions/cache@0781355a23dac32fd3bac414512f4b903437991a
|
||||
with:
|
||||
path: ${{ steps.npm-cache.outputs.dir }}
|
||||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
||||
|
||||
25
.github/workflows/test.yml
vendored
25
.github/workflows/test.yml
vendored
@@ -31,7 +31,6 @@ jobs:
|
||||
|
||||
test:
|
||||
needs: see_if_should_skip
|
||||
if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 60
|
||||
strategy:
|
||||
@@ -39,31 +38,38 @@ jobs:
|
||||
matrix:
|
||||
test-group: [content, meta, rendering, routing, unit, links-and-images]
|
||||
steps:
|
||||
- name: Check out repo
|
||||
# Each of these ifs needs to be repeated at each step to make sure the required check still runs
|
||||
# Even if if doesn't do anything
|
||||
- if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
|
||||
name: Check out repo
|
||||
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
|
||||
with:
|
||||
# Enables cloning the Early Access repo later with the relevant PAT
|
||||
persist-credentials: 'false'
|
||||
|
||||
- name: Setup node
|
||||
- if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
|
||||
name: Setup node
|
||||
uses: actions/setup-node@56899e050abffc08c2b3b61f3ec6a79a9dc3223d
|
||||
with:
|
||||
node-version: 14.x
|
||||
|
||||
- name: Get npm cache directory
|
||||
- if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
|
||||
name: Get npm cache directory
|
||||
id: npm-cache
|
||||
run: |
|
||||
echo "::set-output name=dir::$(npm config get cache)"
|
||||
|
||||
- name: Cache node modules
|
||||
uses: actions/cache@d1255ad9362389eac595a9ae406b8e8cb3331f16
|
||||
- if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
|
||||
name: Cache node modules
|
||||
uses: actions/cache@0781355a23dac32fd3bac414512f4b903437991a
|
||||
with:
|
||||
path: ${{ steps.npm-cache.outputs.dir }}
|
||||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-node-
|
||||
|
||||
- name: Install dependencies
|
||||
- if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
|
||||
name: Install dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Clone early access
|
||||
@@ -73,10 +79,11 @@ jobs:
|
||||
DOCUBOT_REPO_PAT: ${{ secrets.DOCUBOT_REPO_PAT }}
|
||||
|
||||
- name: Run build script
|
||||
if: ${{ github.repository != 'github/docs-internal' }}
|
||||
if: ${{ github.repository != 'github/docs-internal' and needs.see_if_should_skip.outputs.should_skip != 'true'}}
|
||||
run: npm run build
|
||||
|
||||
- name: Run tests
|
||||
- if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
|
||||
name: Run tests
|
||||
run: npx jest tests/${{ matrix.test-group }}/
|
||||
env:
|
||||
NODE_OPTIONS: "--max_old_space_size=4096"
|
||||
|
||||
2
.github/workflows/triage-stale-check.yml
vendored
2
.github/workflows/triage-stale-check.yml
vendored
@@ -16,3 +16,5 @@ jobs:
|
||||
days-before-stale: 7
|
||||
days-before-close: 10
|
||||
stale-pr-label: 'stale'
|
||||
exempt-pr-labels: 'never-stale'
|
||||
exempt-issue-labels: 'never-stale'
|
||||
|
||||
Reference in New Issue
Block a user