Skip to content

Commit

Permalink
Added integration test to pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
Isawan committed Jul 26, 2023
1 parent 231cba6 commit 4fe02f6
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 1 deletion.
13 changes: 12 additions & 1 deletion .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,16 @@ jobs:
- uses: actions/checkout@v3
- name: Build
run: cargo build --verbose

integration_tests:
runs-on: ubuntu-latest
steps:
- id: install-aws-cli
uses: unfor19/install-aws-cli-action@v1
- name: Start containers
run: docker-compose up -d
- name: Run tests
run: cargo test --verbose
run: cargo test --verbose --test integration
- name: Stop containers
if: always()
run: docker-compose down
20 changes: 20 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,26 @@ services:
restart_policy:
condition: on-failure

aws-cli:
depends_on:
- minio
image: docker.io/amazon/aws-cli
entrypoint: aws
network_mode: host
command:
[
"--endpoint-url",
"http://localhost:9000",
"s3api",
"create-bucket",
"--bucket",
"terrashine"
]
environment:
AWS_ACCESS_KEY_ID: minioadmin
AWS_SECRET_ACCESS_KEY: minioadmin
AWS_DEFAULT_REGION: us-east-1

nginx:
image: docker.io/library/nginx
network_mode: host
Expand Down

0 comments on commit 4fe02f6

Please sign in to comment.