Print phase times on development builds #2530
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: pull_request | |
name: Continuous Integration | |
permissions: | |
contents: read | |
jobs: | |
lint: | |
name: Lint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
cache: yarn | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
profile: minimal | |
components: rustfmt | |
- uses: Swatinem/rust-cache@v1 | |
# use `--frozen-lockfile` to fail immediately if the committed yarn.lock needs updates | |
# https://yarnpkg.com/lang/en/docs/cli/install/#toc-yarn-install-frozen-lockfile | |
- run: yarn --frozen-lockfile | |
- run: yarn lint | |
flow: | |
name: Flow | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
cache: yarn | |
- run: yarn --frozen-lockfile | |
- run: yarn flow check | |
benchmarks: | |
name: Benchmarks | |
runs-on: ubuntu-latest | |
steps: | |
- name: PR Benchmarks | |
uses: parcel-bundler/parcel-benchmark-action@master | |
env: | |
PARCEL_BENCHMARK_APIKEY: ${{ secrets.PARCEL_BENCHMARK_APIKEY }} | |
unit_tests: | |
name: Unit tests (${{matrix.os}}, Node ${{matrix.node}}) | |
strategy: | |
matrix: | |
node: [18, 20] | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
runs-on: ${{matrix.os}} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
cache: yarn | |
node-version: ${{matrix.node}} | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
profile: minimal | |
components: rustfmt | |
- uses: Swatinem/rust-cache@v1 | |
- name: Bump max inotify watches (Linux only) | |
run: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p; | |
if: ${{matrix.os == 'ubuntu-latest'}} | |
- run: yarn --frozen-lockfile | |
- run: yarn build-native-release | |
- run: yarn test:unit | |
integration_tests: | |
name: Integration tests (${{matrix.os}}, Node ${{matrix.node}}) | |
strategy: | |
matrix: | |
node: [18, 20] | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
# These tend to be quite flakey, so one failed instance shouldn't stop | |
# others from potentially succeeding | |
fail-fast: false | |
runs-on: ${{matrix.os}} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
cache: yarn | |
node-version: ${{matrix.node}} | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
profile: minimal | |
components: rustfmt | |
- uses: Swatinem/rust-cache@v1 | |
- name: Bump max inotify watches (Linux only) | |
run: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p; | |
if: ${{matrix.os == 'ubuntu-latest'}} | |
- run: yarn --frozen-lockfile | |
- run: yarn build-native-release | |
- run: yarn build | |
- run: yarn test:integration-ci | |
# Similar to | |
# https://github.com/marketplace/actions/publish-unit-test-results#use-with-matrix-strategy | |
- name: Upload JUnit results | |
if: always() | |
uses: actions/upload-artifact@v2 | |
with: | |
name: Integration tests (${{matrix.os}}, node ${{matrix.node}}) | |
path: '**/junit-*.xml' | |
test_report: | |
name: Test report | |
runs-on: ubuntu-latest | |
needs: [unit_tests, integration_tests] | |
if: always() | |
steps: | |
- name: Create test report | |
uses: mikepenz/action-junit-report@v2 | |
with: | |
report_paths: artifacts/**/*.xml |