mirror of
https://github.com/zebrajr/express.git
synced 2026-01-15 12:15:27 +00:00
Bumps [actions/checkout](https://github.com/actions/checkout) from 5.0.0 to 6.0.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](08c6903cd8...1af3b93b68)
---
updated-dependencies:
- dependency-name: actions/checkout
dependency-version: 6.0.0
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
118 lines
3.2 KiB
YAML
118 lines
3.2 KiB
YAML
name: ci
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
- develop
|
|
- '4.x'
|
|
- '5.x'
|
|
- '5.0'
|
|
paths-ignore:
|
|
- '*.md'
|
|
pull_request:
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
# Cancel in progress workflows
|
|
# in the scenario where we already had a run going for that PR/branch/tag but then triggered a new run
|
|
concurrency:
|
|
group: "${{ github.workflow }} ✨ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}"
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
lint:
|
|
name: Lint
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
|
|
with:
|
|
persist-credentials: false
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
|
|
with:
|
|
node-version: 'lts/*'
|
|
|
|
- name: Install dependencies
|
|
run: npm install --ignore-scripts --include=dev
|
|
|
|
- name: Run lint
|
|
run: npm run lint
|
|
|
|
test:
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [ubuntu-latest, windows-latest]
|
|
node-version: [18, 19, 20, 21, 22, 23, 24, 25]
|
|
# Node.js release schedule: https://nodejs.org/en/about/releases/
|
|
|
|
name: Node.js ${{ matrix.node-version }} - ${{matrix.os}}
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- name: Setup Node.js ${{ matrix.node-version }}
|
|
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
|
|
with:
|
|
node-version: ${{ matrix.node-version }}
|
|
|
|
- name: Configure npm loglevel
|
|
run: |
|
|
npm config set loglevel error
|
|
shell: bash
|
|
|
|
- name: Install dependencies
|
|
run: npm install
|
|
|
|
- name: Output Node and NPM versions
|
|
run: |
|
|
echo "Node.js version: $(node -v)"
|
|
echo "NPM version: $(npm -v)"
|
|
|
|
- name: Run tests
|
|
shell: bash
|
|
run: npm run test-ci
|
|
|
|
- name: Upload code coverage
|
|
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
|
|
with:
|
|
name: coverage-node-${{ matrix.node-version }}-${{ matrix.os }}
|
|
path: ./coverage/lcov.info
|
|
retention-days: 1
|
|
|
|
coverage:
|
|
needs: test
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
checks: write
|
|
steps:
|
|
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- name: Install lcov
|
|
shell: bash
|
|
run: sudo apt-get -y install lcov
|
|
|
|
- name: Collect coverage reports
|
|
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
|
|
with:
|
|
path: ./coverage
|
|
pattern: coverage-node-*
|
|
|
|
- name: Merge coverage reports
|
|
shell: bash
|
|
run: find ./coverage -name lcov.info -exec printf '-a %q\n' {} \; | xargs lcov -o ./lcov.info
|
|
|
|
- name: Upload coverage report
|
|
uses: coverallsapp/github-action@5cbfd81b66ca5d10c19b062c04de0199c215fb6e # v2.3.7
|
|
with:
|
|
file: ./lcov.info
|