⬆️ npm(deps-dev): Bump prettier from 2.8.8 to 3.0.1 #33
Workflow file for this run
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
--- | |
name: CI | |
on: | |
pull_request: | |
branches: | |
- main | |
types: | |
- opened | |
- ready_for_review | |
- synchronize | |
- reopened | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
inputs: | |
debug: | |
type: choice | |
description: Debug mode | |
required: false | |
options: | |
- 'true' | |
- 'false' | |
# Allow one concurrent | |
concurrency: | |
group: ${{ format('{0}-{1}-{2}-{3}-{4}', github.workflow, github.event_name, github.ref, github.base_ref, github.head_ref) }} | |
cancel-in-progress: true | |
env: | |
DEBUG: ${{ inputs.debug || secrets.ACTIONS_RUNNER_DEBUG || vars.ACTIONS_RUNNER_DEBUG || secrets.ACTIONS_STEP_DEBUG || vars.ACTIONS_STEP_DEBUG || false }} | |
jobs: | |
build-test: | |
name: Build and Test | |
if: ${{ contains(fromJSON('["push", "workflow_dispatch"]'), github.event_name) || (github.event_name == 'pull_request' && !github.event.pull_request.draft) }} | |
permissions: | |
contents: read | |
issues: read | |
checks: write | |
pull-requests: write | |
actions: write | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- ubuntu-latest | |
- macos-latest | |
- windows-latest | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: 🩺 Debug | |
if: ${{ env.DEBUG == 'true' }} | |
uses: raven-actions/debug@v1 | |
with: | |
vars-context: ${{ toJson(vars) }} | |
secrets-context: ${{ toJson(secrets) }} | |
needs-context: ${{ toJson(needs) }} | |
inputs-context: ${{ toJson(inputs) }} | |
- name: ⤵️ Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: 🔄️ Detect changes | |
uses: dorny/paths-filter@v2 | |
id: changes | |
with: | |
filters: | | |
app: | |
- 'src/**' | |
- 'tests/**' | |
- 'package.json' | |
- 'package-lock.json' | |
- '.node-version' | |
- 'jest.config.js' | |
- 'tsconfig.json' | |
- name: 🚧 Setup Node | |
if: ${{ steps.changes.outputs.app == 'true' }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version-file: .node-version | |
cache: npm | |
- name: 🔀 Install dependencies | |
if: ${{ steps.changes.outputs.app == 'true' }} | |
run: npm ci | |
- name: 🏗️ Build | |
if: ${{ steps.changes.outputs.app == 'true' }} | |
run: npm run build:ci | |
- name: 🧪 Test | |
if: ${{ steps.changes.outputs.app == 'true' }} | |
run: npm run test:ci:cov | |
continue-on-error: true | |
- name: 📤 Upload test results | |
if: ${{ steps.changes.outputs.app == 'true' && matrix.os == 'ubuntu-latest' }} | |
uses: actions/upload-artifact@v3 | |
with: | |
name: test-results | |
path: 'reports/jest-*.xml' | |
if-no-files-found: warn | |
- name: 📤 Upload coverage results | |
if: ${{ steps.changes.outputs.app == 'true' && matrix.os == 'ubuntu-latest' }} | |
uses: actions/upload-artifact@v3 | |
with: | |
name: coverage-results | |
path: coverage | |
if-no-files-found: warn | |
- name: 📜 Test report | |
if: ${{ steps.changes.outputs.app == 'true' && matrix.os == 'ubuntu-latest' }} | |
uses: phoenix-actions/test-reporting@v12 | |
with: | |
name: 📜 Test report | |
path: 'reports/jest-*.xml' | |
reporter: jest-junit | |
- name: 📜 Coverage report | |
if: ${{ steps.changes.outputs.app == 'true' && matrix.os == 'ubuntu-latest' }} | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: coverage/cobertura-coverage.xml |