-
Notifications
You must be signed in to change notification settings - Fork 3
60 lines (51 loc) · 1.8 KB
/
test-production.yml
File metadata and controls
60 lines (51 loc) · 1.8 KB
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
# This runs a small set of basic tests against the production deployment, using the latest released
# CLI image.
---
name: Test Production
on:
workflow_call:
inputs:
releaseVersion:
description: CLI release version to download and install
type: string
default: '1.2.5'
runsOn:
description: The runner to run the workflow on
type: string
default: macos-latest
testRunnerOptions:
description: string of command-line options to pass to the test runner
type: string
secrets:
CLOUDTRUTH_API_KEY:
description: "Production API Key"
required: true
env:
CI: true
jobs:
test:
name: CLI Test (production)
runs-on: ${{ inputs.runsOn }}
defaults:
run:
shell: bash
env:
CLOUDTRUTH_API_KEY: ${{ secrets.CLOUDTRUTH_API_KEY }}
JOB_ID: ${{github.repository}}-${{github.run_id}}-${{github.run_attempt}}-cli-prod
RELEASE_VERSION: ${{ inputs.releaseVersion }}
TEST_ARCHIVE_FILE: integration-test-${{inputs.runsOn}}.tar.zst
steps:
- uses: actions/checkout@v4
with:
repository: cloudtruth/cloudtruth-cli
- run: sh cicd/scripts/install-rust.sh
- uses: taiki-e/install-action@cargo-nextest
# fetch pre-built integration test archive
- uses: dsaltares/fetch-gh-release-asset@1.1.1
with:
repo: cloudtruth/cloudtruth-cli
version: tags/${{ env.RELEASE_VERSION }}
file: ${{ env.TEST_ARCHIVE_FILE }}
# run from pre-built archive
- name: E2E Test
run: cargo nextest run --profile ci --archive-file "$TEST_ARCHIVE_FILE" ${{ inputs.testRunnerOptions }} --workspace-remap "${GITHUB_WORKSPACE}"