ci #1169
This file contains hidden or 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: ci | |
| on: | |
| push: | |
| branches: [ main ] | |
| paths-ignore: | |
| - 'README.md' | |
| - 'docs/**' | |
| - 'assets/**' | |
| - 'tools/**' | |
| pull_request: | |
| branches: [ main ] | |
| paths-ignore: | |
| - 'README.md' | |
| - 'docs/**' | |
| - 'assets/**' | |
| - 'tools/**' | |
| schedule: | |
| - cron: 0 0 * * * | |
| env: | |
| CARGO_TERM_COLOR: always | |
| CARGO_INCREMENTAL: 1 | |
| RUST_BACKTRACE: 1 | |
| TEST_TIME_FACTOR: 2 | |
| AWS_REGION: ap-northeast-1 | |
| ARCH: x86_64 | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| toolchain: nightly | |
| components: rustfmt, clippy | |
| - run: cargo +nightly fmt -- --check | |
| test-infrastructure: | |
| runs-on: ubuntu-latest | |
| needs: lint | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| toolchain: stable | |
| - run: cargo test --verbose --release -p infrastructure | |
| test-command-domain: | |
| runs-on: ubuntu-latest | |
| needs: lint | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| toolchain: stable | |
| - run: cargo test --verbose --release -p command-domain | |
| test-command-interface-adaptor-impl: | |
| runs-on: ubuntu-latest | |
| needs: | |
| lint | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| toolchain: stable | |
| - run: KEEP_CONTAINERS=true cargo test --verbose --release -p command-interface-adaptor-impl | |
| test-command-processor: | |
| runs-on: ubuntu-latest | |
| needs: lint | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| toolchain: stable | |
| - run: cargo test --verbose --release -p command-processor | |
| test-query-interface-adaptor: | |
| runs-on: ubuntu-latest | |
| needs: lint | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| toolchain: stable | |
| - run: KEEP_CONTAINERS=true cargo test --verbose --release -p query-interface-adaptor | |
| test-write-api-server: | |
| runs-on: ubuntu-latest | |
| needs: lint | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| toolchain: stable | |
| - run: cargo test --verbose --release -p write-api-server | |
| test-read-model-updater: | |
| runs-on: ubuntu-latest | |
| needs: lint | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| toolchain: stable | |
| - run: cargo test --verbose --release -p read-model-updater | |
| test-read-api-server: | |
| runs-on: ubuntu-latest | |
| needs: lint | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| toolchain: stable | |
| - run: cargo test --verbose --release -p read-api-server | |
| e2e: | |
| runs-on: ubuntu-latest | |
| needs: | |
| - test-infrastructure | |
| - test-command-domain | |
| - test-command-interface-adaptor-impl | |
| - test-command-processor | |
| - test-query-interface-adaptor | |
| - test-write-api-server | |
| - test-read-model-updater | |
| - test-read-api-server | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install AWS CLI | |
| uses: unfor19/install-aws-cli-action@v1 | |
| with: | |
| version: 2 | |
| - uses: docker/setup-buildx-action@v3 | |
| - run: | | |
| docker buildx create --name amd-arm --driver docker-container --platform linux/amd64 | |
| cd ./tools/e2e-test && make build && cd ../../ | |
| ./tools/scripts/docker-build-write-api-server.sh | |
| ./tools/scripts/docker-build-read-model-updater-local.sh | |
| ./tools/scripts/docker-build-read-api-server.sh | |
| ./tools/scripts/docker-compose-e2e-test.sh |