Skip to content

build(deps-dev): bump prettier from 2.8.7 to 2.8.8 #473

build(deps-dev): bump prettier from 2.8.7 to 2.8.8

build(deps-dev): bump prettier from 2.8.7 to 2.8.8 #473

Workflow file for this run

# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: Build
on:
push:
branches:
- main
pull_request:
branches:
- main
permissions:
contents: read
checks: write
issues: write
packages: read
concurrency:
group: "${{ github.workflow }} @ ${{ github.ref_name }}"
cancel-in-progress: true
jobs:
changes:
name: Detect changes
runs-on: ubuntu-latest
outputs:
code: ${{ steps.filter.outputs.code }}
steps:
- name: Checkout
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
- name: Check if we actually made changes
uses: dorny/paths-filter@4512585405083f25c027a35db413c2b3b9006d50
id: filter
with:
token: ${{ secrets.GITHUB_TOKEN }}
filters: .github/file-filters.yml
warm-up-cache:
name: Warm up the cache
runs-on: ubuntu-latest
needs:
- changes
if: ${{ needs.changes.outputs.code == 'true' }}
steps:
- name: Check out code
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
- name: Set up node
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c
with:
cache: "npm"
cache-dependency-path: package-lock.json
node-version-file: ".nvmrc"
registry-url: https://npm.pkg.github.com
- name: Download dependencies
shell: bash
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
npm ci
npm-build:
name: Build the code
runs-on: ubuntu-latest
needs:
- warm-up-cache
steps:
- name: Check out code
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
- name: Set up node
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c
with:
node-version-file: ".nvmrc"
cache: "npm"
cache-dependency-path: package-lock.json
- name: Download dependencies from cache
shell: bash
run: |
npm ci --offline
- name: Run build
shell: bash
run: |
npm run build
npm-lint:
name: Lint the code
runs-on: ubuntu-latest
needs:
- warm-up-cache
steps:
- name: Check out code
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
- name: Set up node
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c
with:
node-version-file: ".nvmrc"
cache: "npm"
cache-dependency-path: package-lock.json
- name: Download dependencies from cache
shell: bash
run: |
npm ci --offline
- name: Run lint
shell: bash
run: |
npm run lint -- --format=json --output-file reports/lint-report.json
continue-on-error: true
- name: Annotate Code Linting Results
uses: ataylorme/eslint-annotate-action@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
report-json: reports/lint-report.json
npm-test:
name: Test the code
runs-on: ubuntu-latest
needs:
- warm-up-cache
steps:
- name: Check out code
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
with:
fetch-depth: 0
- name: Set up node
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c
with:
node-version-file: ".nvmrc"
cache: "npm"
cache-dependency-path: package-lock.json
- name: Download dependencies from cache
shell: bash
run: |
npm ci --offline
- name: Run tests
env:
JEST_JUNIT_OUTPUT_DIR: reports/
JEST_JUNIT_OUTPUT_NAME: unit-tests-report.xml
run: |
npm run test:ci -- --coverage --testLocationInResults --reporters=default --reporters=jest-junit
continue-on-error: true
- name: Upload unit-test results
uses: enricomi/publish-unit-test-result-action@b9f6c61d965bcaa18acc02d6daf706373a448f02
with:
check_name: Unit-test results
files: reports/unit-tests-report.xml
- name: Setup Code Climate test-reporter
shell: bash
run: |
# download test reporter as a static binary
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
chmod +x ./cc-test-reporter
- name: Run code-climate-test-reporter
shell: bash
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
run: |
./cc-test-reporter format-coverage coverage/lcov.info --input-type lcov --output reports/codeclimate.json
./cc-test-reporter upload-coverage --input reports/codeclimate.json
npm-dependencies:
name: Validate dependencies
runs-on: ubuntu-latest
needs:
- warm-up-cache
steps:
- name: Check out code
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
- name: Set up node
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c
with:
node-version-file: ".nvmrc"
cache: "npm"
cache-dependency-path: package-lock.json
- name: Download dependencies from cache
shell: bash
run: |
npm ci --offline
- name: Check dependencies
shell: bash
run: |
npm run deps:ci
all-done:
name: All done
# this is the job that should be marked as required on GitHub. It's the only one that'll reliably trigger
# when any upstream fails: success
# when all upstream skips: pass
# when all upstream success: success
# combination of upstream skip and success: success
runs-on: ubuntu-latest
needs:
- npm-build
- npm-dependencies
- npm-lint
- npm-test
if: ${{ always() }}
steps:
- name: Fail!
shell: bash
if: ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }}
run: |
echo "One / more upstream failed or was cancelled. Failing job..."
exit 1
- name: Success!
shell: bash
run: |
echo "Great success!"