Skip to content

add the gh actions setup file #7

add the gh actions setup file

add the gh actions setup file #7

Workflow file for this run

name: facebook/metro/build-and-test
on:
push:
defaults:
run:
shell: bash
jobs:
run-js-checks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- uses: ./.github/actions/yarn-install
- run: yarn typecheck
- run: yarn typecheck-ts
- run: yarn lint
- run: yarn test-smoke
test-with-coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- uses: ./.github/actions/yarn-install
- run: yarn test-coverage
- name: Download Codecov Uploader
run: "./.circleci/scripts/install_codecov.sh"
- name: Upload coverage results
run: "./codecov -t ${{ secrets.CODECOV_TOKEN }} -f ./coverage/coverage-final.json"
test:
runs-on: ubuntu-latest
strategy:
matrix:
use-min-supported-version: [true, false]
steps:
- uses: actions/checkout@main
- uses: ./.github/actions/yarn-install
with:
use-min-supported-version: ${{ matrix.use-min-supported-version }}
- name: Run Jest tests
run: yarn jest --ci --maxWorkers 4 --reporters=default --reporters=jest-junit
test-windows:
if: startsWith(github.ref, 'refs/heads/windows/')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- uses: ./.github/actions/yarn-install
- name: Run Jest tests
run: yarn jest --ci --maxWorkers 4 --reporters=default --reporters=jest-junit
# todo: how max workers are best?