Skip to content

chore: fix CI failing due to missing tag in test #6167

chore: fix CI failing due to missing tag in test

chore: fix CI failing due to missing tag in test #6167

Workflow file for this run

name: "Test"
on:
pull_request:
push:
branches:
- master
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
docs:
uses: FuelLabs/github-actions/.github/workflows/vp-docs.yml@master
with:
doc-folder-path: "apps/docs/src"
spellcheck-config-path: "apps/docs/.spellcheck.yml"
environments:
runs-on: ubuntu-latest
name: ${{ matrix.env }} - v${{ matrix.version }}
strategy:
fail-fast: false
matrix:
env: [node]
version: [18.18.2, 20]
timeout-minutes: 25
steps:
- name: Checkout
uses: actions/checkout@v3
- name: CI Setup
uses: ./.github/actions/test-setup
with:
node-version: ${{ matrix.version }}
- name: Verify package.json integrity
run: pnpm lint:package-jsons
- name: Forc Format Check
run: pnpm forc:check
# linting of some tests depends on pretest being run so that it generates the necessary files
- name: Pretest
run: pnpm pretest
- name: Lint
run: pnpm lint
- name: Validate Tests
run: pnpm test:validate
- name: Run Tests - ${{ matrix.env }}
run: pnpm ci:test --${{ matrix.env }}
- name: Upload Coverage - ${{ matrix.env }}
uses: actions/upload-artifact@v2
with:
name: ${{ matrix.env }}
path: coverage/environments/${{ matrix.env }}
test:
runs-on: ubuntu-latest
needs: [environments]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: CI Setup
uses: ./.github/actions/test-setup
- name: Generate Coverage Directory
run: mkdir -p coverage/environments
- name: Download Coverage Artifact for Node Tests
uses: actions/download-artifact@v3
with:
name: node
path: coverage/environments
- name: Generate Coverage
run: pnpm test:coverage-merge
- name: Find PR Number
uses: jwalton/gh-find-current-pr@v1
id: findPr
- name: Upload Master Coverage Artifact
uses: actions/upload-artifact@v3
if: ${{ !steps.findPr.outputs.number }}
with:
name: coverage-master
path: coverage/report
- name: Download Master Coverage Artifact
uses: dawidd6/action-download-artifact@v2
# change to pr number check when rc/salamander has been merged
if: false
with:
workflow: test.yaml
branch: master
name: coverage-master
path: coverage-master
- name: Download Master Coverage Artifact (temporary)
uses: dawidd6/action-download-artifact@v2
if: ${{ (steps.findPr.outputs.number) }}
with:
workflow: test.yaml
run_id: 6628340271
name: coverage-master
path: coverage-master
- name: Generate Coverage Diff
run: pnpm test:coverage-diff
- name: Report Coverage
uses: thollander/actions-comment-pull-request@v2
if: ${{ steps.findPr.outputs.number }}
with:
filePath: coverage/report/coverage-diff.txt
pr_number: ${{ (steps.findPr.outputs.number) }}
comment_tag: diff
mode: recreate
create_if_not_exists: true
live-tests:
name: Run Live Tests
if: github.head_ref == 'changeset-release/master'
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: CI Setup
uses: ./.github/actions/test-setup
- name: Pretest
run: pnpm pretest
- name: Run Isolated Tests
run: pnpm test:e2e
env:
FUEL_NETWORK_URL: https://beta-5.fuel.network/graphql
FUEL_NETWORK_GENESIS_KEY: ${{ secrets.FUEL_NETWORK_GENESIS_KEY }}