From 4072a8f5d88110cff50b28d242522967c0ae2a69 Mon Sep 17 00:00:00 2001 From: Micaiah Martin Date: Fri, 28 Jan 2022 11:23:34 -0700 Subject: [PATCH 1/6] moved linting to the front of CI --- .github/workflows/build.yml | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8c9d9ed670..2c9bb60e06 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -24,6 +24,21 @@ jobs: - name: Print lines of code run: cloc --include-lang TypeScript,JavaScript,HTML,Sass,CSS --vcs git + lint: + name: Lint + runs-on: windows-2019 + steps: + - name: Checkout repo + uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f + + - name: Set up Node + uses: actions/setup-node@46071b5c7a2e0c34e49c3cb8a0e792e86e18d5ea + with: + node-version: '16' + + - name: Run linter + run: npm run lint + setup: name: Setup @@ -104,9 +119,6 @@ jobs: npm run dist npm run test - - name: Run linter - run: npm run lint - - name: Gulp run: gulp ci From 99617cf709c6139e871f4986fd0c7f4e1e37cad7 Mon Sep 17 00:00:00 2001 From: Micaiah Martin Date: Fri, 28 Jan 2022 11:29:49 -0700 Subject: [PATCH 2/6] added dependancies --- .github/workflows/build.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2c9bb60e06..5d631bd3cf 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -37,7 +37,9 @@ jobs: node-version: '16' - name: Run linter - run: npm run lint + run: | + npm ci + npm run lint setup: @@ -62,7 +64,9 @@ jobs: locales-test: name: Locales Test runs-on: ubuntu-20.04 - needs: setup + needs: + - setup + - lint steps: - name: Checkout repo uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f From 236064fbe1ae84d0b4c206a0bc012c4fa8f9dfa3 Mon Sep 17 00:00:00 2001 From: Micaiah Martin Date: Fri, 28 Jan 2022 11:48:09 -0700 Subject: [PATCH 3/6] Update actions and set slack job to check for lint errors --- .github/workflows/build.yml | 42 ++++++++++++++++++++----------------- 1 file changed, 23 insertions(+), 19 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5d631bd3cf..5639150577 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -15,7 +15,7 @@ jobs: runs-on: ubuntu-20.04 steps: - name: Checkout repo - uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f + uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579 - name: Set up cloc run: | @@ -29,10 +29,10 @@ jobs: runs-on: windows-2019 steps: - name: Checkout repo - uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f + uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579 - name: Set up Node - uses: actions/setup-node@46071b5c7a2e0c34e49c3cb8a0e792e86e18d5ea + uses: actions/setup-node@1f8c6b94b26d0feae1e387ca63ccbdc44d27b561 with: node-version: '16' @@ -50,7 +50,7 @@ jobs: adj_build_number: ${{ steps.gen_vars.outputs.adj_build_number }} steps: - name: Checkout repo - uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f + uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579 - name: Get Package Version id: gen_vars @@ -64,12 +64,12 @@ jobs: locales-test: name: Locales Test runs-on: ubuntu-20.04 - needs: + needs: - setup - lint steps: - name: Checkout repo - uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f + uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579 - name: Testing locales - extName length run: | @@ -105,10 +105,10 @@ jobs: _BUILD_NUMBER: ${{ needs.setup.outputs.adj_build_number }} steps: - name: Checkout repo - uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f + uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579 - name: Set up Node - uses: actions/setup-node@46071b5c7a2e0c34e49c3cb8a0e792e86e18d5ea + uses: actions/setup-node@1f8c6b94b26d0feae1e387ca63ccbdc44d27b561 with: node-version: '16' @@ -139,35 +139,35 @@ jobs: call 7z a browser-source.zip "Source\*" - name: Upload Opera artifact - uses: actions/upload-artifact@ee69f02b3dfdecd58bb31b4d133da38ba6fe3700 + uses: actions/upload-artifact@82c141cc518b40d92cc801eee768e7aafc9c2fa2 with: name: dist-opera-${{ env._BUILD_NUMBER }}.zip path: dist/dist-opera.zip if-no-files-found: error - name: Upload Chrome artifact - uses: actions/upload-artifact@ee69f02b3dfdecd58bb31b4d133da38ba6fe3700 + uses: actions/upload-artifact@82c141cc518b40d92cc801eee768e7aafc9c2fa2 with: name: dist-chrome-${{ env._BUILD_NUMBER }}.zip path: dist/dist-chrome.zip if-no-files-found: error - name: Upload Firefox artifact - uses: actions/upload-artifact@ee69f02b3dfdecd58bb31b4d133da38ba6fe3700 + uses: actions/upload-artifact@82c141cc518b40d92cc801eee768e7aafc9c2fa2 with: name: dist-firefox-${{ env._BUILD_NUMBER }}.zip path: dist/dist-firefox.zip if-no-files-found: error - name: Upload Edge artifact - uses: actions/upload-artifact@ee69f02b3dfdecd58bb31b4d133da38ba6fe3700 + uses: actions/upload-artifact@82c141cc518b40d92cc801eee768e7aafc9c2fa2 with: name: dist-edge-${{ env._BUILD_NUMBER }}.zip path: dist/dist-edge.zip if-no-files-found: error - name: Upload browser source - uses: actions/upload-artifact@ee69f02b3dfdecd58bb31b4d133da38ba6fe3700 + uses: actions/upload-artifact@82c141cc518b40d92cc801eee768e7aafc9c2fa2 with: name: browser-source-${{ env._BUILD_NUMBER }}.zip path: dist/browser-source.zip @@ -175,7 +175,7 @@ jobs: - name: Upload coverage artifact if: false - uses: actions/upload-artifact@ee69f02b3dfdecd58bb31b4d133da38ba6fe3700 + uses: actions/upload-artifact@82c141cc518b40d92cc801eee768e7aafc9c2fa2 with: name: coverage-${{ env._BUILD_NUMBER }}.zip path: coverage/coverage-${{ env._BUILD_NUMBER }}.zip @@ -192,10 +192,10 @@ jobs: _CROWDIN_PROJECT_ID: "268134" steps: - name: Checkout repo - uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4 + uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579 - name: Login to Azure - uses: Azure/login@77f1b2e3fb80c0e8645114159d17008b8a2e475a + uses: Azure/login@1f63701bf3e6892515f1b7ce2d2bf1708b46beaf with: creds: ${{ secrets.AZURE_PROD_KV_CREDENTIALS }} @@ -207,7 +207,7 @@ jobs: secrets: "crowdin-api-token" - name: Upload Sources - uses: crowdin/github-action@e39093fd75daae7859c68eded4b43d42ec78d8ea # v1.3.2 + uses: crowdin/github-action@b92956d48336795b1e5e6a353fdef213ada949c5 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} CROWDIN_API_TOKEN: ${{ steps.retrieve-secrets.outputs.crowdin-api-token }} @@ -228,6 +228,7 @@ jobs: - locales-test - build - crowdin-push + - lint steps: - name: Check if any job failed if: ${{ (github.ref == 'refs/heads/master') || (github.ref == 'refs/heads/rc') }} @@ -237,6 +238,7 @@ jobs: LOCALES_TEST_STATUS: ${{ needs.locales-test.result }} BUILD_STATUS: ${{ needs.build.result }} CROWDIN_PUSH_STATUS: ${{ needs.crowdin-push.result }} + LINT_STATUS: ${{ needs.lint.result }} run: | if [ "$CLOC_STATUS" = "failure" ]; then exit 1 @@ -248,10 +250,12 @@ jobs: exit 1 elif [ "$CROWDIN_PUSH_STATUS" = "failure" ]; then exit 1 + elif [ "LINT_STATUS" = "failure" ]; then + exit 1 fi - name: Login to Azure - Prod Subscription - uses: Azure/login@77f1b2e3fb80c0e8645114159d17008b8a2e475a + uses: Azure/login@1f63701bf3e6892515f1b7ce2d2bf1708b46beaf if: failure() with: creds: ${{ secrets.AZURE_PROD_KV_CREDENTIALS }} @@ -265,7 +269,7 @@ jobs: secrets: "devops-alerts-slack-webhook-url" - name: Notify Slack on failure - uses: act10ns/slack@e4e71685b9b239384b0f676a63c32367f59c2522 # v1.2.2 + uses: act10ns/slack@da3191ebe2e67f49b46880b4633f5591a96d1d33 if: failure() env: SLACK_WEBHOOK_URL: ${{ steps.retrieve-secrets.outputs.devops-alerts-slack-webhook-url }} From f2f61131977bac2e4fce7bc58baa1c11b86ca666 Mon Sep 17 00:00:00 2001 From: Micaiah Martin Date: Fri, 28 Jan 2022 12:11:39 -0700 Subject: [PATCH 4/6] Formatting --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5639150577..be30326381 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -28,6 +28,7 @@ jobs: name: Lint runs-on: windows-2019 steps: + - name: Checkout repo uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579 @@ -41,7 +42,6 @@ jobs: npm ci npm run lint - setup: name: Setup runs-on: ubuntu-20.04 From a2c80bf0f9de5655174ad2809e3a42dcca1d107c Mon Sep 17 00:00:00 2001 From: Micaiah Martin Date: Fri, 28 Jan 2022 14:29:11 -0700 Subject: [PATCH 5/6] Moved to ubuntu from windows --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index be30326381..0f4a105512 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -26,7 +26,7 @@ jobs: lint: name: Lint - runs-on: windows-2019 + runs-on: ubuntu-20.04 steps: - name: Checkout repo From 1d2b7c0b42cd94d0d003336376b4a465cc39fcc1 Mon Sep 17 00:00:00 2001 From: Micaiah Martin <77340197+mimartin12@users.noreply.github.com> Date: Fri, 28 Jan 2022 14:40:51 -0700 Subject: [PATCH 6/6] \n strikes again. --- .github/workflows/build.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0f4a105512..4dcab341f4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -28,7 +28,6 @@ jobs: name: Lint runs-on: ubuntu-20.04 steps: - - name: Checkout repo uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579