|
| 1 | +name: "Test (new setup)" |
| 2 | + |
| 3 | +on: |
| 4 | + pull_request: |
| 5 | + push: |
| 6 | + branches: |
| 7 | + - master |
| 8 | + |
| 9 | +concurrency: |
| 10 | + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} |
| 11 | + cancel-in-progress: true |
| 12 | + |
| 13 | +jobs: |
| 14 | + test: |
| 15 | + runs-on: ubuntu-latest |
| 16 | + steps: |
| 17 | + - name: Checkout |
| 18 | + uses: actions/checkout@v3 |
| 19 | + |
| 20 | + - name: CI Setup |
| 21 | + uses: ./.github/actions/ci-setup |
| 22 | + |
| 23 | + - name: Forc Format Check |
| 24 | + run: pnpm forc:check |
| 25 | + |
| 26 | + - name: Build |
| 27 | + run: | |
| 28 | + BUILD_VERSION="0.0.0-${{ github.ref_name }}-$(git rev-parse --short $GITHUB_SHA)" pnpm build |
| 29 | +
|
| 30 | + - name: Lint |
| 31 | + run: | |
| 32 | + pnpm lint |
| 33 | +
|
| 34 | + - name: Checking PR Number |
| 35 | + uses: jwalton/gh-find-current-pr@v1 |
| 36 | + id: findPr |
| 37 | + |
| 38 | + - name: Node unit tests |
| 39 | + run: pnpm test --group=node/unit |
| 40 | + |
| 41 | + - name: Node e2e tests |
| 42 | + run: pnpm test --group=node/e2e |
| 43 | + |
| 44 | + - name: Node+browser unit tests |
| 45 | + run: pnpm test --group=common/unit --env=jsdom && pnpm test --group=common/unit |
| 46 | + |
| 47 | + - name: Node+browser e2e tests |
| 48 | + run: pnpm test --group=common/e2e --env=jsdom && pnpm test --group=common/e2e |
| 49 | + |
| 50 | + # - name: Run tests and publish coverage |
| 51 | + # uses: ArtiomTr/jest-coverage-report-action@v2 |
| 52 | + # if: ${{ steps.findPr.outputs.number }} |
| 53 | + # with: |
| 54 | + # github-token: ${{ secrets.GITHUB_TOKEN }} |
| 55 | + # package-manager: pnpm |
| 56 | + # annotations: failed-tests |
| 57 | + # test-script: pnpm ci:test |
| 58 | + # prnumber: ${{ steps.findPr.outputs.number }} |
| 59 | + |
| 60 | + # - name: Run tests no coverage publishing |
| 61 | + # if: ${{ !steps.findPr.outputs.number }} |
| 62 | + # run: | |
| 63 | + # pnpm ci:test |
0 commit comments