|
| 1 | +name: "[Engine] Integration Tests" |
| 2 | + |
| 3 | +on: |
| 4 | + workflow_dispatch: |
| 5 | + workflow_call: |
| 6 | + secrets: |
| 7 | + INFISICAL_CLIENT_ID: |
| 8 | + required: true |
| 9 | + INFISICAL_CLIENT_SECRET: |
| 10 | + required: true |
| 11 | + |
| 12 | +env: |
| 13 | + PYTHON_VERSION: "3.12" |
| 14 | + INFISICAL_CLI_VERSION: "0.41.2" |
| 15 | + |
| 16 | +permissions: |
| 17 | + checks: write |
| 18 | + contents: read |
| 19 | + |
| 20 | +jobs: |
| 21 | + integration-tests: |
| 22 | + name: Integration Tests |
| 23 | + runs-on: depot-ubuntu-latest |
| 24 | + timeout-minutes: 30 |
| 25 | + defaults: |
| 26 | + run: |
| 27 | + working-directory: engine |
| 28 | + |
| 29 | + steps: |
| 30 | + - name: Checkout code |
| 31 | + uses: actions/checkout@v4 |
| 32 | + |
| 33 | + - name: Set up Python |
| 34 | + uses: actions/setup-python@v5 |
| 35 | + with: |
| 36 | + python-version: ${{ env.PYTHON_VERSION }} |
| 37 | + |
| 38 | + - name: Install uv |
| 39 | + uses: astral-sh/setup-uv@v4 |
| 40 | + with: |
| 41 | + enable-cache: true |
| 42 | + cache-dependency-glob: "engine/uv.lock" |
| 43 | + |
| 44 | + - name: Install go-task |
| 45 | + uses: arduino/setup-task@v2 |
| 46 | + with: |
| 47 | + version: 3.x |
| 48 | + |
| 49 | + - name: Install Infisical CLI |
| 50 | + run: | |
| 51 | + curl -fsSL "https://github.com/Infisical/infisical/releases/download/infisical-cli%2Fv${INFISICAL_CLI_VERSION}/infisical_${INFISICAL_CLI_VERSION}_linux_amd64.deb" -o /tmp/infisical.deb |
| 52 | + sudo dpkg -i /tmp/infisical.deb |
| 53 | + rm /tmp/infisical.deb |
| 54 | +
|
| 55 | + - name: Install engine dependencies |
| 56 | + run: task ci:setup |
| 57 | + |
| 58 | + - name: Authenticate Infisical |
| 59 | + env: |
| 60 | + INFISICAL_CLIENT_ID: ${{ secrets.INFISICAL_CLIENT_ID }} |
| 61 | + INFISICAL_CLIENT_SECRET: ${{ secrets.INFISICAL_CLIENT_SECRET }} |
| 62 | + run: | |
| 63 | + TOKEN=$(infisical login --method=universal-auth \ |
| 64 | + --client-id="$INFISICAL_CLIENT_ID" \ |
| 65 | + --client-secret="$INFISICAL_CLIENT_SECRET" \ |
| 66 | + --silent --plain) |
| 67 | + echo "::add-mask::$TOKEN" |
| 68 | + echo "INFISICAL_TOKEN=$TOKEN" >> "$GITHUB_ENV" |
| 69 | +
|
| 70 | + - name: Run integration tests |
| 71 | + run: task test:integration |
| 72 | + |
| 73 | + - name: Publish Test Report |
| 74 | + uses: mikepenz/action-junit-report@v5 |
| 75 | + if: always() |
| 76 | + with: |
| 77 | + report_paths: "engine/test-results/integration.xml" |
| 78 | + update_check: true |
| 79 | + detailed_summary: true |
| 80 | + include_passed: true |
| 81 | + include_time_in_summary: true |
| 82 | + fail_on_failure: true |
| 83 | + |
| 84 | + - name: Upload artifacts |
| 85 | + uses: actions/upload-artifact@v4 |
| 86 | + if: always() |
| 87 | + with: |
| 88 | + name: engine-integration-test-results |
| 89 | + path: engine/test-results/ |
| 90 | + retention-days: 14 |
0 commit comments