Merge backend #3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Integration test(backend) | |
on: | |
push: | |
branches: [ "develop" ] | |
pull_request: | |
branches: [ "develop" ] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
services: | |
mariadb: | |
image: mariadb:latest | |
env: | |
MYSQL_ROOT_PASSWORD: password | |
MYSQL_DATABASE: world | |
TZ: Asia/Tokyo | |
ports: | |
- 3306:3306 | |
options: --health-cmd="mariadb-admin ping" --health-interval=10s --health-timeout=5s --health-retries=3 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Cache cargo registry | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
- name: run minio | |
run: | | |
docker run -d -p 9000:9000 --name minio \ | |
-e "MINIO_ACCESS_KEY=access_key" \ | |
-e "MINIO_SECRET_KEY=secret_key" \ | |
-v /tmp/data:/data \ | |
-v /tmp/config:/root/.minio \ | |
minio/minio server /data | |
- name: Build test | |
run: cargo build -p backend_app --release --verbose | |
- name: Run test | |
run: export CODEGEN_SKIP=true && source app/backend_app/.env.dev && cargo test -- --ignored backend |