-
Notifications
You must be signed in to change notification settings - Fork 20
83 lines (71 loc) · 2.14 KB
/
rust-cm-integ-tests.yml
File metadata and controls
83 lines (71 loc) · 2.14 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
name: Rust SDK cluster management integration tests
permissions: {}
on:
push:
branches: [ main ]
paths:
- 'rust/cluster_management/**'
- '.github/workflows/rust-cm-integ-tests.yml'
- '.github/workflows/clean-clusters.yml'
pull_request:
branches: [ main ]
paths:
- 'rust/cluster_management/**'
- '.github/workflows/rust-cm-integ-tests.yml'
- '.github/workflows/clean-clusters.yml'
# Give us a button to allow running the workflow on demand for testing.
workflow_dispatch:
inputs:
tags:
description: 'Manual Workflow Run'
required: false
type: string
jobs:
format:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Set up Rust
run: rustup update
- name: Check formatting
working-directory: ./rust/cluster_management
run: |
rustup component add rustfmt
cargo fmt -- --check
test:
runs-on: ubuntu-latest
timeout-minutes: 30
permissions:
id-token: write # required by aws-actions/configure-aws-credentials
concurrency:
# Ensure only 1 job mutates clusters in this account at a time.
group: ${{ github.workflow }}
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Set up Rust
run: rustup update
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.RUST_IAM_ROLE }}
aws-region: us-east-1
- name: Configure and run integration for cluster management
working-directory: ./rust/cluster_management
run: |
cargo test -- --nocapture
cleanup:
if: always()
needs: test
uses: ./.github/workflows/clean-clusters.yml
with:
aws_region: 'us-east-1'
secrets:
AWS_IAM_ROLE: ${{ secrets.RUST_IAM_ROLE }}
permissions:
id-token: write # required by aws-actions/configure-aws-credentials
concurrency:
# Ensure only 1 job mutates clusters in this account at a time.
group: ${{ github.workflow }}