Skip to content

chore(deps): update actions/checkout action to v4 #2510

chore(deps): update actions/checkout action to v4

chore(deps): update actions/checkout action to v4 #2510

Workflow file for this run

name: Build
on:
push:
branches:
- main
- 'renovate/**'
- 'github-renovate/**'
pull_request:
jobs:
lint:
uses: vidavidorra/.github/.github/workflows/node-lint.yml@dc51b746f22c1852be005d71f102feb29cf425cf # v2.2.3
build:
name: Build (Node.js v${{ matrix.node }})
runs-on: ubuntu-latest
timeout-minutes: 5
strategy:
fail-fast: false
matrix:
node: [12, 14, 16]
steps:
- name: Checkout
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
- name: Setup node
uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1
with:
node-version: ${{ matrix.node }}
- name: Install project
run: npm ci --ignore-scripts
- name: Build
run: npm run build
test:
name: Test (Node.js v${{ matrix.node }})
runs-on: ubuntu-latest
timeout-minutes: 5
strategy:
fail-fast: false
matrix:
node: [12, 14, 16]
steps:
- name: Checkout
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
- name: Setup node
uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1
with:
node-version: ${{ matrix.node }}
- name: Install project
run: npm ci --ignore-scripts
- name: Test
run: npm run test:ci
code-coverage:
needs: [lint, build, test]
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
- name: Setup node
uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1
with:
node-version: 14
- name: Install project
run: npm ci --ignore-scripts
- name: Test
run: npm test
- name: Upload coverage to Codecov
uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # v3.1.4
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage/cobertura-coverage.xml
release:
needs: [lint, build, test, code-coverage]
runs-on: ubuntu-latest
# GitHub API requests can easy take a couple of seconds and the release can
# make lots of API requests when a release has a lot of commits. If every
# requests takes five seconds, which is on the high side for a request, this
# could perform 180 requests. This should be enough for most use cases.
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
with:
# Make sure the release step uses its own credentials.
persist-credentials: false
- name: Setup node
uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1
with:
node-version: 18
- name: Install project
run: npm ci --ignore-scripts
- name: Build
run: npm run build
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.SEMANTIC_RELEASE_GITHUB_TOKEN }}
GIT_AUTHOR_NAME: vidavidorra-release
GIT_AUTHOR_EMAIL: [email protected]
GIT_COMMITTER_NAME: vidavidorra-release
GIT_COMMITTER_EMAIL: [email protected]
NPM_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
run: npx --no-install semantic-release