@dr-js/core@0.5.13-dev.0 #94
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: ci-test-tag | |
on: # https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-syntax-for-github-actions#onpushpull_requestbranchestags | |
push: { tags: [ "v*" ] } # use `v0.0.0` tag pattern | |
env: | |
cache-version: 20220513 | |
cache-path: | # actually "\n" separated string | |
.github/cache/persist-gitignore/ | |
~/.npm/ | |
IS_CI: true | |
jobs: | |
test-tag: # job id | |
timeout-minutes: 15 | |
strategy: | |
fail-fast: false # allow all test to run to the end | |
matrix: | |
os: [ "ubuntu-latest", "windows-latest", "macos-latest" ] | |
node-version: [ "21.x" ] # latest version | |
include: [ { os: "ubuntu-latest", node-version: "16.x" }, { os: "ubuntu-latest", node-version: "14.x" } ] # min-support version | |
runs-on: "${{ matrix.os }}" | |
steps: | |
- { uses: "actions/checkout@v3" } # https://github.com/actions/checkout | |
- { uses: "actions/setup-node@v3", with: { node-version: "${{ matrix.node-version }}" } } # 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: dr-dev -c .github/cache/config.js --cache-step setup | |
- { uses: "actions/cache@v3", with: { # https://github.com/actions/cache | |
key: "${{ runner.os }}-${{ env.cache-version }}-${{ matrix.node-version }}-${{ hashFiles('.github/cache/temp-gitignore/checksum-file') }}", | |
restore-keys: "${{ runner.os }}-${{ env.cache-version }}-${{ matrix.node-version }}-", | |
path: "${{ env.cache-path }}" | |
} } | |
- run: dr-dev -c .github/cache/config.js --cache-step mark | |
- run: npm8 ci --omit=optional # TODO: wait for npm@7 adoption and try npm install + cache for faster puppeteer install | |
- run: npm test | |
- run: dr-dev -c .github/cache/config.js --cache-step prune | |
publish-tag: # job id | |
needs: [ "test-tag" ] # https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idneeds | |
timeout-minutes: 15 | |
runs-on: "ubuntu-latest" | |
steps: | |
- { uses: "actions/checkout@v3" } # https://github.com/actions/checkout | |
- { uses: "actions/setup-node@v3", with: { node-version: "20.x" } } # LTS version # 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 | |
- run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_AUTH_TOKEN_DR_JS }}" > .npmrc | |
- run: npm run script-publish |