Skip to content

feat(xsd): beta

feat(xsd): beta #65

Workflow file for this run

name: Test
on:
pull_request:
workflow_call:
inputs:
target-package:
type: string
description: Rush package to run the tests for (e.g. 'app')
required: true
jobs:
test:
name: Run Tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Schema
uses: actions/checkout@v3
with:
repository: MisaelMa/cfdi-schema
path: packages/cfdi/schema
token: ${{ secrets.PAT_GITHUB }}
- name: Cache dependencies
uses: ./.github/actions/cache
- name: Set Rush arguments
id: set-rush-args
run: echo "::set-output name=RUSH_ARGS::${{ github.event_name == 'pull_request' && '--to git:HEAD~1' || format('--from {0}', inputs.target-package) }}"
- name: Install Rush and dependencies
id: install
run: node common/scripts/install-run-rush.js install
- name: Check for dependency mismatches
run: node common/scripts/install-run-rush.js check
# - name: Run linter in affected packages
# run: node common/scripts/install-run-rush.js lint ${{ steps.set-rush-args.outputs.RUSH_ARGS }}
- name: Run tests in affected packages
id: tests
if: always() && steps.install.outcome == 'success'
run: node common/scripts/install-run-rush.js test:ci
- name: Store code coverage reports
if: always() && steps.tests.outcome == 'failure'
uses: actions/upload-artifact@v3
with:
name: code-coverage-reports
path: packages/*/coverage/lcov-report/
retention-days: 3