From 05d019cd7e43d3dc0d1417406d80c3646d22263b Mon Sep 17 00:00:00 2001 From: Chris Millar Date: Sun, 10 Apr 2022 17:12:13 -0600 Subject: [PATCH 1/2] Add recommendations --- .vscode/extensions.json | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 .vscode/extensions.json diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 0000000000..1fe46f17cf --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,9 @@ +{ + "recommendations": [ + "stylelint.vscode-stylelint", + "dbaeumer.vscode-eslint", + "editorconfig.editorconfig", + "ryanluker.vscode-coverage-gutters", + "eamodio.gitlens" + ] +} From b12f16aaa184409ea696c49e45f4578cb9ce67af Mon Sep 17 00:00:00 2001 From: Chris Millar Date: Sun, 10 Apr 2022 17:17:12 -0600 Subject: [PATCH 2/2] Update actions --- .github/pull_request_template.md | 6 ++-- .github/workflows/run-tests-on-fork.yaml | 24 --------------- .github/workflows/run-tests.yaml | 38 ++++++++++++++---------- 3 files changed, 25 insertions(+), 43 deletions(-) delete mode 100644 .github/workflows/run-tests-on-fork.yaml diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 979ce3a5f4..cbb90b1971 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1,7 +1,7 @@ Please always provide the [GitHub issue(s)](../issues) your PR is for, as well as test URLs where your change can be observed (before and after): -Fix # +Resolves: Test URLs: -- Before: https://main----.hlx.page/ -- After: https://----.hlx.page/ +- Before: https://main--milo--adobecom.hlx.page/ +- After: https://--milo--adobecom.hlx.page/ diff --git a/.github/workflows/run-tests-on-fork.yaml b/.github/workflows/run-tests-on-fork.yaml deleted file mode 100644 index 617cfe7787..0000000000 --- a/.github/workflows/run-tests-on-fork.yaml +++ /dev/null @@ -1,24 +0,0 @@ -# Run this action only for pull requests from forked repositories -name: Fork Tests - -on: - pull_request_target: - types: [opened, synchronize, reopened, edited] - -jobs: - build: - if: github.repository_owner != 'adobecom' # replace 'adobe' with repo owner - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: Use Node.js - uses: actions/setup-node@v3 - with: - node-version: '14' - - run: npm install - working-directory: test - - run: npm run lint - - run: npm test - working-directory: test - env: - CI: true diff --git a/.github/workflows/run-tests.yaml b/.github/workflows/run-tests.yaml index c3b982b251..8d8b2452d8 100644 --- a/.github/workflows/run-tests.yaml +++ b/.github/workflows/run-tests.yaml @@ -1,28 +1,34 @@ -# Run this action only for pull requests from this repository -name: Tests - +name: Run tests on: pull_request: types: [opened, synchronize, reopened, edited] branches: - main - jobs: build: - if: github.repository_owner == 'adobe' # replace 'adobe' with repo owner runs-on: ubuntu-latest + strategy: + matrix: + node-version: [14.x] steps: - - uses: actions/checkout@v3 - - name: Use Node.js - uses: actions/setup-node@v3 + - name: Checkout repository + uses: actions/checkout@v2 + with: + fetch-depth: 2 + + - name: Set up Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 with: - node-version: '14' - - run: npm install - working-directory: test - - run: npm run lint - - run: npm test - working-directory: test - env: - CI: true + node-version: ${{ matrix.node-version }} + + - name: Install XVFB + run: sudo apt-get install xvfb + + - name: Install dependencies + run: npm install + + - name: Run the tests + run: xvfb-run -a npm test + - name: Upload coverage to Codecov uses: codecov/codecov-action@v2