Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Acc tests schedule #390

Merged
merged 2 commits into from
May 24, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions .github/workflows/acceptance-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
name: "AWS Acceptance Tests"

on:
schedule:
- cron: '0 4 * * SUN'
workflow_dispatch:
inputs:
branch:
Expand Down Expand Up @@ -72,3 +74,45 @@ jobs:
name: "ebs_failure_logs.zip"
path: "ebs_failure_logs.zip"
retention-days: 5

ebssurrogate-acc-tests:
needs:
- get-go-version
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
name: AWS EBS Surrogate Acceptance tests
steps:
- uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0
with:
ref: ${{ github.event.inputs.branch }}
- uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0
with:
go-version: ${{ needs.get-go-version.outputs.go-version }}
- name: "Compile/install the plugin on the current branch"
run: |
make dev
- uses: aws-actions/configure-aws-credentials@e1e17a757e536f70e52b5a12b2e8d1d1c60e04ef # v2
with:
aws-access-key-id: "${{ secrets.AWS_ACC_TEST_KEY_ID }}"
aws-secret-access-key: "${{ secrets.AWS_ACC_TEST_KEY_SECRET }}"
aws-region: "${{ secrets.AWS_ACC_TEST_REGION }}"
role-to-assume: "${{ secrets.AWS_ACC_TEST_ROLE }}"
role-session-name: "packer-aws-acceptance-tests"
role-duration-seconds: 14400 # 4h
- run: |
echo "Testing with Go ${{ needs.get-go-version.outputs.go-version }}"
PACKER_ACC=1 go test \
-timeout 1h \
-count 1 \
-run "${{ github.event.inputs.run_pattern }}" \
./builder/ebssurrogate
- run: zip ebssurrogate_failure_logs.zip builder/ebssurrogate/*txt
if: ${{ failure() }}
- uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
if: ${{ failure() }}
with:
name: "ebssurrogate_failure_logs.zip"
path: "ebssurrogate_failure_logs.zip"
retention-days: 5