From 9a9b67a9dbb79e51b461617cdd539edae3275ddf Mon Sep 17 00:00:00 2001 From: Vaughan Jones Date: Thu, 16 May 2024 12:19:01 +1000 Subject: [PATCH 1/3] Run tests in GitHub Actions --- .github/workflows/ci.yml | 48 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..67296635 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,48 @@ +name: CI + +on: + pull_request: + branches: + - master + push: + branches: + - master + tags: + - 'v*.*.*' + +jobs: + test: + runs-on: ubuntu-latest + strategy: + matrix: + node-version: [14, 16, 18, 20] + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup NodeJS ${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + cache: 'yarn' + + - name: Install dependencies + run: yarn install --frozen-lockfile + + - name: Run tests + env: + JEST_JUNIT_OUTPUT_DIR: ./test-reports/jest + JEST_JUNIT_OUTPUT_NAME: results.xml + JEST_JUNIT_CLASSNAME: "{filepath}" + run: yarn ci:test + + - name: Upload test results + uses: actions/upload-artifact@v4 + with: + name: test-results-node-${{ matrix.node-version }} + path: ./test-reports + + - name: Test summary + uses: test-summary/action@v1 + with: + paths: ./test-reports/jest/results.xml From b1cfa7a6d9cb0d154ba0d70c0d5deec45e5afbdf Mon Sep 17 00:00:00 2001 From: Vaughan Jones Date: Thu, 16 May 2024 12:20:32 +1000 Subject: [PATCH 2/3] nicer job name --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 67296635..fad5a337 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,6 +12,7 @@ on: jobs: test: + name: "test-node-${{ matrix.node-version }}" runs-on: ubuntu-latest strategy: matrix: From e5ea8abd7b2c1029d282bf6bc8eb2e873411afd0 Mon Sep 17 00:00:00 2001 From: Vaughan Jones Date: Thu, 16 May 2024 12:22:12 +1000 Subject: [PATCH 3/3] adds github actions dependabot configuration --- .github/dependabot.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 3faa882b..b7589b4c 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -9,3 +9,11 @@ updates: time: "05:00" timezone: Australia/Sydney open-pull-requests-limit: 99 +- package-ecosystem: github-actions + directory: "/" + schedule: + interval: weekly + day: monday + time: "05:00" + timezone: Australia/Sydney + open-pull-requests-limit: 5