|
29 | 29 | run: make test
|
30 | 30 | - name: lint
|
31 | 31 | run: make lint
|
| 32 | + acceptance: |
| 33 | + runs-on: ubuntu-latest |
| 34 | + steps: |
| 35 | + - uses: actions/checkout@v5 |
| 36 | + - uses: hashicorp/setup-terraform@v3 |
| 37 | + - uses: actions/setup-go@v5 |
| 38 | + with: |
| 39 | + go-version-file: 'go.mod' |
| 40 | + - uses: docker/setup-compose-action@v1 |
| 41 | + - uses: astral-sh/setup-uv@v6 |
| 42 | + - name: install oxide cli |
| 43 | + run: | |
| 44 | + mkdir -p bin |
| 45 | + wget https://github.com/oxidecomputer/oxide.rs/releases/download/v0.13.0+20250730.0.0/oxide-cli-x86_64-unknown-linux-gnu.tar.xz |
| 46 | + tar xvf oxide-cli-x86_64-unknown-linux-gnu.tar.xz |
| 47 | + mv oxide-cli-x86_64-unknown-linux-gnu/oxide bin |
| 48 | + echo "$(pwd)/bin" >> $GITHUB_PATH |
| 49 | + # Run simulated omicron in the background with docker compose. |
| 50 | + # TODO(jmcarp): support tests against multiple omicron versions. |
| 51 | + # TODO(jmcarp): publish this image for faster builds. |
| 52 | + - name: omicron-dev |
| 53 | + working-directory: acctest |
| 54 | + run: | |
| 55 | + docker compose build |
| 56 | + docker compose up --wait --wait-timeout 900 |
| 57 | + # We can't use `oxide auth login` here, since it requires a browser to |
| 58 | + # complete the oauth device flow. Instead, fetch an auth token using a |
| 59 | + # script that simulates the browser flow. |
| 60 | + - id: auth-token |
| 61 | + working-directory: acctest |
| 62 | + run: | |
| 63 | + echo "OXIDE_TOKEN=$(uv run auth.py)" >> $GITHUB_OUTPUT |
| 64 | + - name: oxide-dependencies |
| 65 | + run: | |
| 66 | + sudo apt-get update && sudo apt-get install -y qemu-utils |
| 67 | + wget https://dl-cdn.alpinelinux.org/alpine/v3.22/releases/cloud/generic_alpine-3.22.1-x86_64-bios-tiny-r0.qcow2 |
| 68 | + qemu-img convert -f qcow2 -O raw generic_alpine-3.22.1-x86_64-bios-tiny-r0.qcow2 alpine.raw |
| 69 | + ./scripts/acc-test-setup.sh |
| 70 | + env: |
| 71 | + OXIDE_HOST: http://localhost:12220 |
| 72 | + OXIDE_TOKEN: ${{ steps.auth-token.outputs.OXIDE_TOKEN }} |
| 73 | + - name: test |
| 74 | + shell: bash |
| 75 | + run: | |
| 76 | + make testacc |
| 77 | + env: |
| 78 | + OXIDE_HOST: http://localhost:12220 |
| 79 | + OXIDE_TOKEN: ${{ steps.auth-token.outputs.OXIDE_TOKEN }} |
| 80 | + OXIDE_TEST_IP_POOL_NAME: default |
| 81 | + OXIDE_SILO_DNS_NAME: "*.sys.oxide-dev.test" |
0 commit comments