|
11 | 11 | TZ: /usr/share/zoneinfo/America/Los_Angeles
|
12 | 12 |
|
13 | 13 | jobs:
|
| 14 | + # ----- FLOW ----- |
| 15 | + discover_flow_inline_configs: |
| 16 | + name: Discover flow inline configs |
| 17 | + runs-on: ubuntu-latest |
| 18 | + outputs: |
| 19 | + matrix: ${{ steps.set-matrix.outputs.result }} |
| 20 | + steps: |
| 21 | + - uses: actions/checkout@v4 |
| 22 | + - uses: actions/github-script@v7 |
| 23 | + id: set-matrix |
| 24 | + with: |
| 25 | + script: | |
| 26 | + const inlinedHostConfigs = require('./scripts/shared/inlinedHostConfigs.js'); |
| 27 | + return inlinedHostConfigs.map(config => config.shortName); |
| 28 | +
|
| 29 | + flow: |
| 30 | + name: Flow check ${{ matrix.flow_inline_config_shortname }} |
| 31 | + needs: discover_flow_inline_configs |
| 32 | + runs-on: ubuntu-latest |
| 33 | + continue-on-error: true |
| 34 | + strategy: |
| 35 | + matrix: |
| 36 | + flow_inline_config_shortname: ${{ fromJSON(needs.discover_flow_inline_configs.outputs.matrix) }} |
| 37 | + steps: |
| 38 | + - uses: actions/checkout@v4 |
| 39 | + - uses: actions/setup-node@v4 |
| 40 | + with: |
| 41 | + node-version: 18.20.1 |
| 42 | + cache: yarn |
| 43 | + cache-dependency-path: yarn.lock |
| 44 | + - name: Restore cached node_modules |
| 45 | + uses: actions/cache@v4 |
| 46 | + id: node_modules |
| 47 | + with: |
| 48 | + path: "**/node_modules" |
| 49 | + key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }} |
| 50 | + - run: yarn install --frozen-lockfile |
| 51 | + - run: node ./scripts/tasks/flow-ci ${{ matrix.flow_inline_config_shortname }} |
| 52 | + |
| 53 | + # ----- FIZZ ----- |
| 54 | + check_generated_fizz_runtime: |
| 55 | + name: Confirm generated inline Fizz runtime is up to date |
| 56 | + runs-on: ubuntu-latest |
| 57 | + steps: |
| 58 | + - uses: actions/checkout@v4 |
| 59 | + - uses: actions/setup-node@v4 |
| 60 | + with: |
| 61 | + node-version: 18.20.1 |
| 62 | + cache: yarn |
| 63 | + cache-dependency-path: yarn.lock |
| 64 | + - name: Restore cached node_modules |
| 65 | + uses: actions/cache@v4 |
| 66 | + id: node_modules |
| 67 | + with: |
| 68 | + path: "**/node_modules" |
| 69 | + key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }} |
| 70 | + - run: yarn install --frozen-lockfile |
| 71 | + - run: | |
| 72 | + yarn generate-inline-fizz-runtime |
| 73 | + git diff --quiet || (echo "There was a change to the Fizz runtime. Run `yarn generate-inline-fizz-runtime` and check in the result." && false) |
| 74 | +
|
| 75 | + # ----- FEATURE FLAGS ----- |
| 76 | + flags: |
| 77 | + name: Check flags |
| 78 | + runs-on: ubuntu-latest |
| 79 | + steps: |
| 80 | + - uses: actions/checkout@v4 |
| 81 | + - uses: actions/setup-node@v4 |
| 82 | + with: |
| 83 | + node-version: 18.20.1 |
| 84 | + cache: yarn |
| 85 | + cache-dependency-path: yarn.lock |
| 86 | + - name: Restore cached node_modules |
| 87 | + uses: actions/cache@v4 |
| 88 | + id: node_modules |
| 89 | + with: |
| 90 | + path: "**/node_modules" |
| 91 | + key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }} |
| 92 | + - run: yarn install --frozen-lockfile |
| 93 | + - run: yarn flags |
| 94 | + |
| 95 | + # ----- TESTS ----- |
| 96 | + test: |
| 97 | + name: yarn test ${{ matrix.params }} (Shard ${{ matrix.shard }}) |
| 98 | + runs-on: ubuntu-latest |
| 99 | + strategy: |
| 100 | + matrix: |
| 101 | + params: |
| 102 | + - "-r=stable --env=development" |
| 103 | + - "-r=stable --env=production" |
| 104 | + - "-r=experimental --env=development" |
| 105 | + - "-r=experimental --env=production" |
| 106 | + - "-r=www-classic --env=development --variant=false" |
| 107 | + - "-r=www-classic --env=production --variant=false" |
| 108 | + - "-r=www-classic --env=development --variant=true" |
| 109 | + - "-r=www-classic --env=production --variant=true" |
| 110 | + - "-r=www-modern --env=development --variant=false" |
| 111 | + - "-r=www-modern --env=production --variant=false" |
| 112 | + - "-r=www-modern --env=development --variant=true" |
| 113 | + - "-r=www-modern --env=production --variant=true" |
| 114 | + - "-r=xplat --env=development --variant=false" |
| 115 | + - "-r=xplat --env=development --variant=true" |
| 116 | + - "-r=xplat --env=production --variant=false" |
| 117 | + - "-r=xplat --env=production --variant=true" |
| 118 | + # TODO: Test more persistent configurations? |
| 119 | + - "-r=stable --env=development --persistent" |
| 120 | + - "-r=experimental --env=development --persistent" |
| 121 | + shard: |
| 122 | + - 1/5 |
| 123 | + - 2/5 |
| 124 | + - 3/5 |
| 125 | + - 4/5 |
| 126 | + - 5/5 |
| 127 | + continue-on-error: true |
| 128 | + steps: |
| 129 | + - uses: actions/checkout@v4 |
| 130 | + - uses: actions/setup-node@v4 |
| 131 | + with: |
| 132 | + node-version: 18.20.1 |
| 133 | + cache: yarn |
| 134 | + cache-dependency-path: yarn.lock |
| 135 | + - name: Restore cached node_modules |
| 136 | + uses: actions/cache@v4 |
| 137 | + id: node_modules |
| 138 | + with: |
| 139 | + path: "**/node_modules" |
| 140 | + key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }} |
| 141 | + - run: yarn install --frozen-lockfile |
| 142 | + - run: yarn test ${{ matrix.params }} --ci=github --shard=${{ matrix.shard }} |
| 143 | + |
| 144 | + # ----- BUILD ----- |
14 | 145 | build_and_lint:
|
15 | 146 | name: yarn build and lint
|
16 | 147 | runs-on: ubuntu-latest
|
|
0 commit comments