Merge pull request #56 from anephenix/dependabot/npm_and_yarn/babel/e… #89
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
# Node.js CI Workflow | |
name: Node.js CI | |
on: | |
push: | |
branches: [master] | |
pull_request: | |
branches: [master] | |
permissions: | |
contents: read # Required for actions/checkout to read the repository | |
checks: write # Required to update the status of checks (e.g., for test results) | |
statuses: write # Required to set commit statuses (used for PRs and commits) | |
security-events: write # Required for uploading coverage reports to services like Code Climate | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
NODE_ENV: test | |
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }} | |
strategy: | |
matrix: | |
node-version: [22.x] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v2 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: 'npm' | |
- run: npm i | |
- run: curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter | |
- run: chmod +x ./cc-test-reporter | |
- run: ./cc-test-reporter before-build | |
- run: npm run cover | |
- run: touch mcg.config.js | |
- run: ./cc-test-reporter after-build | |
if: github.event_name != 'pull_request' |