|
4 | 4 | branches: [main] |
5 | 5 | pull_request: |
6 | 6 | branches: [main] |
| 7 | + merge_group: |
7 | 8 | workflow_dispatch: |
8 | 9 | concurrency: |
9 | 10 | group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} |
10 | 11 | cancel-in-progress: ${{ github.ref_name != 'main' }} |
11 | 12 | jobs: |
12 | | - test: |
13 | | - strategy: |
14 | | - fail-fast: false |
15 | | - matrix: |
16 | | - os: [ubuntu-latest, macos-latest] |
17 | | - folder: |
18 | | - - "." |
19 | | - - "examples/simple" |
20 | | - - "examples/aggregate" |
21 | | - runs-on: ${{ matrix.os }} |
| 13 | + macos-cli-smoke: |
| 14 | + runs-on: macos-latest |
22 | 15 | steps: |
23 | 16 | - uses: actions/checkout@v7 |
24 | 17 | - uses: bazel-contrib/setup-bazel@0.19.0 |
25 | 18 | with: |
26 | 19 | bazelisk-cache: true |
27 | | - disk-cache: ${{ github.workflow }} |
| 20 | + disk-cache: ${{ github.workflow }}-macos |
28 | 21 | repository-cache: true |
29 | 22 |
|
30 | | - - name: Test ${{ matrix.folder }} |
31 | | - working-directory: ${{ matrix.folder }} |
32 | | - run: bazel test //... |
33 | | - |
34 | | - - name: Run FormatJS CLI from a consumer workspace |
35 | | - if: matrix.folder == 'examples/simple' |
36 | | - working-directory: ${{ matrix.folder }} |
| 23 | + - name: Run macOS CLI from a consumer workspace |
| 24 | + working-directory: examples/simple |
37 | 25 | run: bazel run @rules_formatjs//cli -- --version |
38 | 26 |
|
39 | | - - name: Upload test logs |
40 | | - if: failure() |
41 | | - uses: actions/upload-artifact@v7 |
42 | | - with: |
43 | | - name: test-logs-${{ matrix.os }}-${{ hashFiles(matrix.folder) }} |
44 | | - path: | |
45 | | - ${{ matrix.folder }}/bazel-testlogs/**/test.log |
46 | | - ${{ matrix.folder }}/bazel-testlogs/**/test.xml |
47 | | - if-no-files-found: warn |
48 | | - retention-days: 7 |
| 27 | + - name: Smoke test extraction and compilation |
| 28 | + run: bazel test //tests/arguments:test_fixtures_0_test //tests/arguments:test_fixtures_1_test |
49 | 29 |
|
50 | 30 | linux-arm64-smoke: |
51 | 31 | runs-on: ubuntu-24.04-arm |
|
94 | 74 | - name: Extract messages from a large source list |
95 | 75 | shell: bash |
96 | 76 | run: bazel test //tests/arguments:large_source_list_test |
| 77 | + |
| 78 | + ci: |
| 79 | + if: always() |
| 80 | + needs: [macos-cli-smoke, linux-arm64-smoke, windows-cli-smoke] |
| 81 | + runs-on: ubuntu-latest |
| 82 | + steps: |
| 83 | + - name: Require every native smoke test |
| 84 | + env: |
| 85 | + RESULTS: ${{ toJSON(needs) }} |
| 86 | + run: jq -e 'all(.[]; .result == "success")' <<< "$RESULTS" |
0 commit comments