Skip to content

Commit

Permalink
ci: switch to rust integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bbortt committed Jul 4, 2024
1 parent 1f87235 commit f554b75
Show file tree
Hide file tree
Showing 15 changed files with 177 additions and 243 deletions.
47 changes: 11 additions & 36 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,18 @@ jobs:
build:
name: 'Rust Build'
runs-on: ubuntu-latest
services:
vault:
image: hashicorp/vault:1.17.1
ports:
- 8200:8200
options: --cap-add=IPC_LOCK
env:
VAULT_DEV_ROOT_TOKEN_ID: 'root-token'
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Install stable toolchain
- name: Install stable Toolchain
uses: actions-rs/toolchain@v1
with:
profile: ${{ env.TOOLCHAIN_PROFILE }}
Expand All @@ -40,10 +48,11 @@ jobs:
with:
command: clippy
# args: -- -D warnings
- name: Unit- and Integration-Tests
- name: Unit and Integration Tests
uses: actions-rs/cargo@v1
env:
RUST_TEST_THREADS: 1
VAULT_TOKEN: 'root-token'
with:
command: test
- name: Build Binary
Expand All @@ -56,40 +65,6 @@ jobs:
with:
name: cli
path: target/release/propeller
test:
name: 'Integration Test CLI'
needs: build
runs-on: ubuntu-latest
services:
vault:
image: hashicorp/vault:1.17.1
ports:
- 8200:8200
options: --cap-add=IPC_LOCK
env:
VAULT_DEV_ROOT_TOKEN_ID: 'root-token'
steps:
- name: Check out code
uses: actions/checkout@v4
with:
name: cli
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20.15.0
cache: 'npm'
- name: Install node.js packages
run: npm ci
- name: Wait for Vault
run: npm run ci:wait-for-vault
- name: Download Binary
uses: actions/download-artifact@v4
- name: Run integration tests
run: |
chmod 755 ./cli/propeller
./cli/propeller init-vault -c dev/config.yml
env:
VAULT_TOKEN: 'root-token'
check:
name: 'Resources Validation'
runs-on: ubuntu-latest
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 19 additions & 0 deletions .idea/runConfigurations/Integration_Test_propeller.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 19 additions & 0 deletions .idea/runConfigurations/Unit_Test_propeller.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,9 @@ serde_yaml = "0.9.34+deprecated"
tokio = { version = "1.38.0", features = ["macros", "rt"] }
vaultrs = "0.7.2"
rand = "0.9.0-alpha.1"

[dev-dependencies]
assert_cmd = "2.0.14"
predicates = "3.1.0"
reqwest = { version = "0.12.5", features = ["json"] }
serde_json = "1.0.120"
Loading

0 comments on commit f554b75

Please sign in to comment.