Skip to content

(TFECO-8268) Enable code coverage reporting #3067

(TFECO-8268) Enable code coverage reporting

(TFECO-8268) Enable code coverage reporting #3067

Workflow file for this run

name: Run tests
on:
push:
branches:
- main
- pre-release
paths-ignore:
- 'syntaxes/**'
- 'tests/**'
- '**.md'
pull_request:
branches:
- main
- pre-release
paths-ignore:
- 'syntaxes/**'
- 'tests/**'
- '**.md'
jobs:
lint:
runs-on: ubuntu-latest
timeout-minutes: 3
steps:
- name: Checkout Repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version-file: '.nvmrc'
cache: npm
- name: npm install
run: npm ci
- name: check types
run: npm run check-types
- name: format
run: npm run check-format
- name: lint
run: npm run lint
test:
strategy:
fail-fast: false
matrix:
vscode:
- '1.92.2'
- 'insiders'
- 'stable'
os:
- windows-latest
- macos-latest
- ubuntu-latest
runs-on: ${{ matrix.os }}
timeout-minutes: 10
env:
VSCODE_VERSION: ${{ matrix.vscode }}
steps:
- name: Checkout Repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version-file: '.nvmrc'
cache: npm
- name: Install Terraform
uses: hashicorp/setup-terraform@v3
with:
terraform_wrapper: false
terraform_version: '~1.9'
- name: Terraform version
run: terraform version
- name: Clean Install Dependencies
run: npm ci
- name: Allow unprivileged user namespace (ubuntu)
if: runner.os == 'Linux'
run: sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
- name: Run Tests
run: xvfb-run -a npm test
if: runner.os == 'Linux'
- name: Run Tests
run: npm test
if: runner.os != 'Linux'
- name: Run UI Tests
run: xvfb-run --auto-servernum --server-args='-screen 0 1920x1080x24' npm run test:ui
if: runner.os == 'Linux'
- name: Run UI Tests
run: npm run test:ui
if: runner.os != 'Linux'
- name: Archive test artifacts
uses: actions/upload-artifact@v4
if: failure()
with:
name: test-screenshots-${{ matrix.os }}-${{ matrix.vscode }}
path: .test-storage/screenshots
retention-days: 1