Skip to content

chore(deps-dev): bump the vitest group with 2 updates #2655

chore(deps-dev): bump the vitest group with 2 updates

chore(deps-dev): bump the vitest group with 2 updates #2655

Workflow file for this run

name: Node.js CI
on:
push:
branches:
- main
paths-ignore:
- '**.md'
pull_request:
paths-ignore:
- '**.md'
merge_group:
permissions:
actions: read
jobs:
lint:
name: Lint Check
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4.1.1
- name: Use Node.js ${{ vars.NODE_VERSION }}
uses: actions/setup-node@v4.0.1
with:
node-version: ${{ vars.NODE_VERSION }}
cache: npm
- name: Install Dependencies
run: npm ci --ignore-scripts
- name: ESLint
run: npm run lint:eslint
- name: Prettier
run: npm run lint:prettier
unit-test:
name: Unit Test
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4.1.1
- name: Use Node.js ${{ vars.NODE_VERSION }}
uses: actions/setup-node@v4.0.1
with:
node-version: ${{ vars.NODE_VERSION }}
cache: npm
- name: Install Dependencies
run: npm ci --ignore-scripts
- name: Unit Test
run: npm test -- --coverage
- name: Report Code Coverage to codecov
uses: codecov/codecov-action@v3.1.4
build:
name: Build
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4.1.1
- name: Use Node.js ${{ vars.NODE_VERSION }}
uses: actions/setup-node@v4.0.1
with:
node-version: ${{ vars.NODE_VERSION }}
cache: npm
- name: Install Dependencies
run: npm ci --ignore-scripts
- name: Build
run: npm run build
- name: Upload Action Assets
uses: actions/upload-artifact@v3.1.3
with:
name: dist
path: dist
integration-test:
name: Integration Test
needs: [build]
environment: Develop
strategy:
matrix:
os:
- ubuntu-22.04
- ubuntu-20.04
- macos-12
- macos-11
- windows-2022
- windows-2019
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4.1.1
- name: Download Action Assets
uses: actions/download-artifact@v3.0.2
with:
name: dist
path: dist
- name: Execute GitHub Action
id: act
uses: ./
with:
contents: |
foo
bar
baz
weights: |
10
10
10
- name: Echo Action outputs
env:
STEPS_CONTEXT: ${{ toJson(steps.act.outputs) }}
run: echo $STEPS_CONTEXT
diff:
name: Compare Build Assets
if: github.event_name == 'pull_request'
needs: [build]
permissions:
issues: write
pull-requests: write
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4.1.1
with:
ref: main
- name: Use Node.js ${{ vars.NODE_VERSION }}
uses: actions/setup-node@v4.0.1
with:
node-version: ${{ vars.NODE_VERSION }}
cache: npm
- name: Install Dependencies
run: npm ci --ignore-scripts
- name: Build Action Assets on main
run: npm run build
- name: Download Current Action Assets
uses: actions/download-artifact@v3.0.2
with:
name: dist
path: current
- name: Setup js-beautify to compare minified js files
run: |
npm install --global js-beautify
git config --local diff.minjs.textconv js-beautify
echo "index.js diff=minjs" > .gitattributes
- name: Compare
id: compare
continue-on-error: true
run: |
echo '# Compare ${{ github.sha }} to main' >> $GITHUB_STEP_SUMMARY
echo '```diff' >> $GITHUB_STEP_SUMMARY
git diff --no-index ./dist/ ./current/ >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
git diff --no-index --exit-code ./dist/ ./current/
- name: Report diff
if: steps.compare.outcome == 'failure'
uses: actions/github-script@v6
with:
script: |
const message = 'There is a difference in the build results.'
core.warning(message)
await github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: `${message} [Show More](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})`
})