Summary: Pull Request resolved: https://github.com/facebook/yoga/pull/1467 1. Avoid reusing workflow names between validation and publish jobs, since they show up with the same UI when wanting to adhoc trigger a publish. 2. Merge SwiftPM checks into Validate Apple job 3. Merge remnants of website-next workflow into website workflow (and remove a redundant explicit build step already removed in one workflow) 4. Run more validation on push to release branch 5. Do not run website validation off of main, since it is only ever deployed from main branch Reviewed By: cipolleschi Differential Revision: D51236885 fbshipit-source-id: dd8165aa9871f173d8914f345569c6cde1edda72
105 lines
2.0 KiB
YAML
105 lines
2.0 KiB
YAML
name: Validate JavaScript
|
|
|
|
on:
|
|
pull_request:
|
|
push:
|
|
branches:
|
|
- main
|
|
- 'release-*'
|
|
workflow_dispatch:
|
|
|
|
env:
|
|
FORCE_COLOR: 3
|
|
|
|
jobs:
|
|
benchmark:
|
|
name: Benchmark [${{ matrix.os }}]
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest, windows-latest]
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Setup
|
|
uses: ./.github/actions/setup-js
|
|
|
|
- name: yarn benchmark
|
|
run: yarn benchmark
|
|
working-directory: javascript
|
|
|
|
build:
|
|
name: Build [${{ matrix.os }}]
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest, windows-latest]
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Setup
|
|
uses: ./.github/actions/setup-js
|
|
|
|
- name: yarn build
|
|
run: yarn build
|
|
working-directory: javascript
|
|
|
|
test:
|
|
name: Test [${{ matrix.os }}]
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest, windows-latest]
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Setup
|
|
uses: ./.github/actions/setup-js
|
|
|
|
- name: yarn test
|
|
run: yarn test
|
|
working-directory: javascript
|
|
|
|
lint:
|
|
name: ESLint (All Packages)
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Setup
|
|
uses: ./.github/actions/setup-js
|
|
|
|
- name: yarn lint
|
|
run: yarn lint
|
|
|
|
typecheck:
|
|
name: Typecheck
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Setup
|
|
uses: ./.github/actions/setup-js
|
|
|
|
- name: yarn tsc
|
|
run: yarn tsc
|
|
working-directory: javascript
|
|
|
|
pack:
|
|
name: Pack
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Setup
|
|
uses: ./.github/actions/setup-js
|
|
|
|
- name: yarn pack
|
|
run: yarn pack --filename yoga-layout.tar.gz
|
|
working-directory: javascript
|
|
|
|
- uses: actions/upload-artifact@v3
|
|
with:
|
|
name: npm-package
|
|
path: javascript/yoga-layout.tar.gz
|