Skip to content

build(deps): bump actions/checkout from 3.5.3 to 4.1.0 #337

build(deps): bump actions/checkout from 3.5.3 to 4.1.0

build(deps): bump actions/checkout from 3.5.3 to 4.1.0 #337

Workflow file for this run

name: CI
on:
push:
branches:
- main
tags:
- v[0-9]+.[0-9]+.[0-9]+*
pull_request:
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, macOS-latest, ubuntu-latest]
node-version: [14.x, 16.x, 18.x]
steps:
- name: Fix git checkout line endings
run: git config --global core.autocrlf input
- uses: actions/[email protected]
- name: Setup Node.js
uses: actions/[email protected]
with:
node-version: ${{ matrix.node-version }}
- name: Get npm cache directory
id: npm-cache-dir
run: |
echo "::set-output name=dir::$(npm config get cache)"
- name: NPM cache
id: npm-cache # use this to check for `cache-hit` ==> if: steps.npm-cache.outputs.cache-hit != 'true'
uses: actions/[email protected]
with:
path: ${{ steps.npm-cache-dir.outputs.dir }}
key: ${{ runner.OS }}-node-${{ hashFiles('**/package.json') }}
restore-keys: |
${{ runner.OS }}-node-
- name: Install
run: npm install --engine-strict
- name: Lint
run: npm run lint
- name: Testsuite
run: npm run coverage
- name: Upload code coverage to Codecov
uses: codecov/[email protected]
with:
file: ./coverage/lcov.info
env_vars: CI_OS,NODE_VERSION
env:
CI_OS: ${{ matrix.os }}
NODE_VERSION: ${{ matrix.node-version }}
# This is primarily to have a required status check
test-completed:
needs: test
runs-on: ubuntu-latest
steps:
- run: "echo Testsuite passed"
dependabot-automerge:
needs: test-completed
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' }}
permissions:
pull-requests: write
contents: write
steps:
- name: Dependabot metadata
id: metadata
uses: dependabot/[email protected]
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
- name: Auto-approve
run: gh pr review --approve "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Auto-merge
run: gh pr merge --auto --squash "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}