Skip to content

Commit

Permalink
CHG: ci: update & merge ci config
Browse files Browse the repository at this point in the history
- also drop cache
  • Loading branch information
dr-js committed Dec 25, 2023
1 parent 50fbe69 commit 5773303
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 114 deletions.
28 changes: 0 additions & 28 deletions .github/cache/config.js

This file was deleted.

44 changes: 44 additions & 0 deletions .github/workflows/ci-test-2312.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: "ci-test-2312"
on: { push: { branches: [ "**" ], tags: [ "v*" ] } } # use `v0.0.0` tag pattern # https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-syntax-for-github-actions#onpushpull_requestbranchestags
env: { "IS_CI": true }
jobs:
"test-base": # job id
strategy:
matrix: { OS: [ "ubuntu-latest", "windows-latest", "macos-latest" ], NODE: [ "20.x" ] } # LTS version
fail-fast: false # allow all test to run to the end
runs-on: "${{ matrix.OS }}"
timeout-minutes: 15
steps:
- { uses: "actions/checkout@v4" } # https://github.com/actions/checkout
- { uses: "actions/setup-node@v4", with: { node-version: "${{ matrix.NODE }}" } } # https://github.com/actions/setup-node
- run: npx @dr-js/dev@0.5 -eI .github/ci-patch.js
- run: npm ci --omit=optional
- run: npm test

"test-extra": # job id
if: "github.ref_type == 'tag'" # only run on git tag push
strategy:
matrix: { OS: [ "ubuntu-latest", "windows-latest", "macos-latest" ], NODE: [ "21.x" ], include: [ { OS: "ubuntu-latest", NODE: "14.x" } ] } # latest version + min-support version
fail-fast: false # allow all test to run to the end
runs-on: "${{ matrix.OS }}"
timeout-minutes: 15
steps:
- { uses: "actions/checkout@v4" } # https://github.com/actions/checkout
- { uses: "actions/setup-node@v4", with: { node-version: "${{ matrix.NODE }}" } } # https://github.com/actions/setup-node
# TODO: wait for npm fix # - run: npx @dr-js/dev@0.5 -eI .github/ci-patch.js
- run: npm i -g @dr-js/core@0.5 @dr-js/dev@0.5 @min-pack/npm@0.1 && dr-dev -eI .github/ci-patch.js
- run: npm8 ci --omit=optional # TODO: wait for npm@7 adoption and try npm install + cache for faster puppeteer install
- run: npm test

"publish-tag": # job id
if: "github.ref_type == 'tag'" # only run on git tag push
needs: [ "test-base", "test-slow-tag" ] # https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idneeds
runs-on: "ubuntu-latest"
timeout-minutes: 15
steps:
- { uses: "actions/checkout@v4" } # https://github.com/actions/checkout
- { uses: "actions/setup-node@v4", with: { node-version: "20.x" } } # LTS version # https://github.com/actions/setup-node
- run: npx @dr-js/dev@0.5 -eI .github/ci-patch.js
- run: npm ci --omit=optional
- run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_AUTH_TOKEN_DR_JS }}" > .npmrc
- run: npm run script-publish
36 changes: 0 additions & 36 deletions .github/workflows/ci-test-push.yml

This file was deleted.

50 changes: 0 additions & 50 deletions .github/workflows/ci-test-tag.yml

This file was deleted.

0 comments on commit 5773303

Please sign in to comment.