From 8b1036a0c53c074f03d4d8db26d1fb587cddf5cb Mon Sep 17 00:00:00 2001 From: Christian Cook <3473396+CookieCookson@users.noreply.github.com> Date: Tue, 12 Dec 2023 13:42:04 +0000 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feature/pipelines=20(#352)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: Run dependabot against develop and version/2.x.x * feat: Run CodeQL against develop and version/2.x.x * refactor: Consolidate test pipeline, run against develop and version/2.x.x --- .github/dependabot.yml | 16 +++++---- .github/workflows/codeql-analysis.yml | 4 +-- .github/workflows/test-pr.yml | 31 ----------------- .github/workflows/test-push-to-master.yml | 38 -------------------- .github/workflows/test.yml | 42 +++++++++++++++++++++++ 5 files changed, 53 insertions(+), 78 deletions(-) delete mode 100644 .github/workflows/test-pr.yml delete mode 100644 .github/workflows/test-push-to-master.yml create mode 100644 .github/workflows/test.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml index fe250ebd..c5b835a0 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,11 +1,13 @@ -# To get started with Dependabot version updates, you'll need to specify which -# package ecosystems to update and where the package manifests are located. -# Please see the documentation for all configuration options: -# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates - version: 2 updates: - - package-ecosystem: "npm" # See documentation for possible values - directory: "/" # Location of package manifests + - package-ecosystem: "npm" + directory: / + target-branch: develop + schedule: + interval: "monthly" + + - package-ecosystem: "npm" + directory: / + target-branch: version/2.x.x schedule: interval: "monthly" diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index a9cfca86..014f1e2e 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -7,10 +7,10 @@ name: "CodeQL" on: push: - branches: [master] + branches: [develop, version/2.x.x] pull_request: # The branches below must be a subset of the branches above - branches: [master] + branches: [develop, version/2.x.x] schedule: - cron: '0 3 * * 3' diff --git a/.github/workflows/test-pr.yml b/.github/workflows/test-pr.yml deleted file mode 100644 index 5133d5b3..00000000 --- a/.github/workflows/test-pr.yml +++ /dev/null @@ -1,31 +0,0 @@ -# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node -# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions - -name: Pull Request Checks - -on: - pull_request: - branches: [master] - -jobs: - build: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 - with: - node-version: 16.x - - name: Use npm 9 - run: npm i -g npm@9 - - name: Install Dependencies - run: npm ci - - name: Check Prettier Formatting - run: npm run test:format - - name: Run ESLint - run: npm run lint - - name: Run Unit Tests - run: npm run test:unit - - name: Build - run: npm run build --if-present diff --git a/.github/workflows/test-push-to-master.yml b/.github/workflows/test-push-to-master.yml deleted file mode 100644 index b7a080de..00000000 --- a/.github/workflows/test-push-to-master.yml +++ /dev/null @@ -1,38 +0,0 @@ -# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node -# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions - -name: Test - -on: - push: - branches: [master] - -jobs: - test: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@master - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@master - with: - node-version: 16.x - - name: Use npm 9 - run: npm i -g npm@9 - - name: Install Dependencies - run: npm ci - - name: Check Prettier Formatting - run: npm run test:format - - name: Run ESLint - run: npm run lint - - name: Build - run: npm run build - - name: Run Tests - run: npm run test - env: - CI: true - LRS_CREDENTIALS_ARRAY: ${{ secrets.LRS_CREDENTIALS_ARRAY }} - - name: Coveralls - uses: coverallsapp/github-action@master - with: - github-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 00000000..a2de41bc --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,42 @@ +name: Test + +on: + push: + branches: [develop, version/2.x.x] + pull_request: + branches: [develop, version/2.x.x] + +jobs: + test: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Use Node.js 18 + uses: actions/setup-node@v1 + with: + node-version: 18.x + + - name: Install Dependencies + run: npm ci + + - name: Prettier + run: npm run test:format + + - name: ESLint + run: npm run lint + + - name: Build + run: npm run build --if-present + + - name: Test + run: npm run test + env: + CI: true + LRS_CREDENTIALS_ARRAY: ${{ secrets.LRS_CREDENTIALS_ARRAY }} + + - name: Coverage + uses: coverallsapp/github-action@master + with: + github-token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file