|
| 1 | +name: Framework Docker Compose Tests |
| 2 | +on: |
| 3 | + push: |
| 4 | + |
| 5 | +jobs: |
| 6 | + test: |
| 7 | + defaults: |
| 8 | + run: |
| 9 | + working-directory: framework/examples/myproject |
| 10 | + runs-on: ubuntu-latest |
| 11 | + permissions: |
| 12 | + id-token: write |
| 13 | + contents: read |
| 14 | + strategy: |
| 15 | + fail-fast: false |
| 16 | + matrix: |
| 17 | + test: |
| 18 | + - name: TestChipIngressSmoke |
| 19 | + config: smoke_chip.toml |
| 20 | + count: 1 |
| 21 | + timeout: 10m |
| 22 | + name: ${{ matrix.test.name }} |
| 23 | + steps: |
| 24 | + - name: Checkout repo |
| 25 | + uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 |
| 26 | + |
| 27 | + - name: Configure AWS credentials using OIDC |
| 28 | + uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2 |
| 29 | + with: |
| 30 | + role-to-assume: ${{ secrets.AWS_CTF_READ_ACCESS_ROLE_ARN }} |
| 31 | + aws-region: us-west-2 |
| 32 | + |
| 33 | + - name: Login to Amazon ECR |
| 34 | + id: login-ecr-private |
| 35 | + uses: aws-actions/amazon-ecr-login@062b18b96a7aff071d4dc91bc00c4c1a7945b076 # v2.0.1 |
| 36 | + with: |
| 37 | + registries: ${{ format('{0},{1}', secrets.AWS_ACCOUNT_ID_SDLC, secrets.AWS_ACCOUNT_ID_PROD) }} |
| 38 | + env: |
| 39 | + AWS_REGION: us-west-2 |
| 40 | + |
| 41 | + - name: Check for changes in Docker Components |
| 42 | + uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 |
| 43 | + id: changes |
| 44 | + with: |
| 45 | + filters: | |
| 46 | + src: |
| 47 | + - 'framework/components/dockercompose/**' |
| 48 | + - '.github/workflows/framework-components-tests.yml' |
| 49 | +
|
| 50 | + - name: Set up Go |
| 51 | + uses: actions/setup-go@v5 |
| 52 | + with: |
| 53 | + go-version: '1.24.0' |
| 54 | + |
| 55 | + - name: Cache Go modules |
| 56 | + uses: actions/cache@v4 |
| 57 | + with: |
| 58 | + path: | |
| 59 | + ~/.cache/go-build |
| 60 | + ~/go/pkg/mod |
| 61 | + key: go-modules-${{ hashFiles('framework/examples/myproject/go.sum') }}-${{ runner.os }}-framework-golden-examples |
| 62 | + restore-keys: | |
| 63 | + go-modules-${{ runner.os }}-framework-golden-examples |
| 64 | + go-modules-${{ runner.os }} |
| 65 | +
|
| 66 | + - name: Install dependencies |
| 67 | + run: go mod download |
| 68 | + |
| 69 | + - name: Run System Tests |
| 70 | + if: steps.changes.outputs.src == 'true' |
| 71 | + env: |
| 72 | + CTF_CONFIGS: ${{ matrix.test.config }} |
| 73 | + run: | |
| 74 | + go test -timeout ${{ matrix.test.timeout }} -v -count ${{ matrix.test.count }} -run ${{ matrix.test.name }} |
| 75 | +
|
| 76 | + - name: Upload Logs |
| 77 | + if: always() |
| 78 | + uses: actions/upload-artifact@v4 |
| 79 | + with: |
| 80 | + name: container-logs-${{ matrix.test.name }} |
| 81 | + path: framework/examples/myproject/logs |
| 82 | + retention-days: 1 |
0 commit comments