aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/pr-lint.yml
diff options
context:
space:
mode:
authorFlorian Merz <me@fiji-flo.de>2021-02-26 15:40:06 +0100
committerFlorian Merz <me@fiji-flo.de>2021-03-01 14:37:02 +0100
commita03ed6b6125921ff7f66ac6431782039d604cba4 (patch)
tree2641acd1bb8eed73e36900aa2cdbb7c6ca427b47 /.github/workflows/pr-lint.yml
parent09b2b0c5dba96a586a84ee500a9745830251502d (diff)
downloadtranslated-content-a03ed6b6125921ff7f66ac6431782039d604cba4.tar.gz
translated-content-a03ed6b6125921ff7f66ac6431782039d604cba4.tar.bz2
translated-content-a03ed6b6125921ff7f66ac6431782039d604cba4.zip
add CI
Diffstat (limited to '.github/workflows/pr-lint.yml')
-rw-r--r--.github/workflows/pr-lint.yml44
1 files changed, 44 insertions, 0 deletions
diff --git a/.github/workflows/pr-lint.yml b/.github/workflows/pr-lint.yml
new file mode 100644
index 0000000000..5330e98619
--- /dev/null
+++ b/.github/workflows/pr-lint.yml
@@ -0,0 +1,44 @@
+# Checks the PR itself for hygiene things.
+
+name: PR Lint
+
+on:
+ pull_request:
+ # Necessary to re-run if someone edits the PR without a new pushed commit.
+ types: [opened, edited, synchronize, reopened]
+
+jobs:
+ check:
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@v2
+ with:
+ path: mdn/translated-content
+
+ - uses: actions/checkout@v2
+ with:
+ repository: mdn/content
+ path: mdn/content
+ # Yes, this means fetch EVERY COMMIT EVER.
+ # It's probably not sustainable in the far future (e.g. past 2021)
+ # but for now it's good enough. We'll need all the history
+ # so we can figure out each document's last-modified date.
+ fetch-depth: 0
+
+ - name: Setup Node.js environment
+ uses: actions/setup-node@v2.1.4
+ with:
+ node-version: "12"
+
+ - name: Install all yarn packages
+ run: |
+ cd $GITHUB_WORKSPACE/mdn/content/
+ cd pr-lint
+ yarn --frozen-lockfile
+
+ - name: Run checks
+ run: |
+ cd $GITHUB_WORKSPACE/mdn/content/
+ cd pr-lint
+ yarn run check