-
Notifications
You must be signed in to change notification settings - Fork 85
93 lines (92 loc) · 3.12 KB
/
tests-mac-x86.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
on:
workflow_dispatch:
inputs:
composition-versions:
description: 'JSON list of supergraph versions'
required: true
type: string
router-versions:
description: 'JSON list of router versions'
required: true
type: string
jobs:
build-rover:
name: Build Rover for macOS x86-64
# Arm64 runner for cross-compilation
runs-on: macos-14
steps:
- uses: actions/checkout@v4
name: "Checkout rover repo"
- uses: actions-rs/toolchain@v1
name: "Install x86_64 toolchain for cross-compilation"
with:
toolchain: stable
target: x86_64-apple-darwin
- run: |
rustup target add x86_64-apple-darwin
# Build rover
- uses: actions-rs/cargo@v1
name: "Build rover binary"
with:
command: build
args: --target x86_64-apple-darwin
# Build xtask
- uses: actions-rs/cargo@v1
name: "Build xtask binary"
with:
command: build
args: --target x86_64-apple-darwin -p xtask
- uses: actions/upload-artifact@v4
name: "Store built binaries to use later on"
with:
path: |
target/x86_64-apple-darwin/debug/rover
target/x86_64-apple-darwin/debug/xtask
if-no-files-found: error
retention-days: 5
integration-tests:
needs: build-rover
name: Run integration tests on macOS x86-64
strategy:
matrix:
composition-version: ${{ fromJSON(inputs.composition-versions) }}
# x86-64 runner
runs-on: macos-14-large
env:
TEST_COMPOSITION_VERSION: "=${{ matrix.composition-version }}"
ROVER_BINARY: ../../artifact/rover
FLYBY_APOLLO_KEY: ${{ secrets.FLYBY_APOLLO_KEY }}
steps:
- uses: actions/checkout@v4
name: "Checkout rover repo"
- uses: actions/download-artifact@v4
name: "Download artifacts built in previous stages"
- uses: volta-cli/action@v4
name: "Install volta"
- name: Add explicit version to `supergraph.yaml` files
run: |
for f in examples/flyby/supergraphs/*.yaml; do yq -i '.federation_version = strenv(TEST_COMPOSITION_VERSION)' $f; cat $f; done
- name: Run Integration tests
run: |
chmod +x ./artifact/{rover,xtask}
./artifact/xtask integration-test
smoke-tests:
needs: build-rover
name: Run simple smoke tests on macOS x86-64
strategy:
matrix:
composition-version: ${{ fromJSON(inputs.composition-versions) }}
router-version: ${{ fromJSON(inputs.router-versions) }}
# x86-64 runner
runs-on: macos-13
steps:
- uses: actions/checkout@v4
name: "Checkout rover repo"
- uses: actions/download-artifact@v4
name: "Download artifacts built in previous stages"
- uses: volta-cli/action@v4
name: "Install volta"
- name: Run Smoke Tests
run: |
chmod +x ./artifact/{rover,xtask}
./artifact/xtask smoke --binary-path ./artifact/rover --federation-version "${{ matrix.composition-version }}" --router-version "${{ matrix.router-version }}"