Feature: Flexible, Generic WebSocket Sessions #376
Workflow file for this run
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: CI # Continuous Integration | |
on: | |
pull_request: | |
paths-ignore: | |
- "**.md" | |
push: | |
branches: | |
- main | |
paths-ignore: | |
- "**.md" | |
workflow_dispatch: | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
check: | |
name: Test Suite | |
runs-on: ubuntu-latest | |
env: | |
RUSTFLAGS: -D warnings | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.pull_request.head.ref }} | |
fetch-depth: 0 | |
- name: Install Rust toolchain | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
components: llvm-tools-preview | |
- uses: davidB/rust-cargo-make@v1 | |
- uses: Swatinem/rust-cache@v2 | |
- name: Install nextest | |
uses: taiki-e/install-action@nextest | |
- name: Install cargo-llvm-cov | |
uses: taiki-e/install-action@cargo-llvm-cov | |
- name: Check formatting | |
run: cargo make format | |
- name: Clippy check | |
run: cargo make check | |
- name: Run Unit Tests | |
run: cargo make cov-ci | |
- name: Upload coverage data to codecov | |
uses: codecov/codecov-action@v4 | |
with: | |
files: lcov.info | |
fail_ci_if_error: true | |
token: ${{ secrets.CODECOV_TOKEN }} | |
test: | |
name: Integration Test | |
runs-on: ubuntu-latest | |
needs: check | |
env: | |
AUTH_URL: ${{ vars.AUTH_URL }} | |
DATABASE_USERNAME: nakago | |
DATABASE_PASSWORD: nakago | |
DATABASE_PORT: 1701 | |
DATABASE_URL_ASYNC_GRAPHQL: postgresql://nakago:nakago@localhost:1701/async-graphql | |
CONFIG_PATH_ASYNC_GRAPHQL: examples/async-graphql/config.ci.toml | |
CONFIG_PATH_SIMPLE: examples/simple/config.ci.toml | |
CONFIG_PATH_SIMPLE_WARP: examples/simple-warp/config.ci.toml | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Install Rust toolchain | |
uses: dtolnay/rust-toolchain@stable | |
- uses: davidB/rust-cargo-make@v1 | |
- uses: Swatinem/rust-cache@v2 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Run docker-compose | |
run: docker compose -f docker-compose.yml up -d | |
- name: Install SQLx CLI | |
uses: baptiste0928/cargo-install@v3 | |
with: | |
crate: sqlx-cli | |
args: --no-default-features --features rustls,postgres | |
version: latest | |
- name: Create Databases | |
run: cargo make db-create | |
- name: Migrate Databases | |
run: cargo make db-migrate | |
- name: Run Integration Tests | |
run: cargo make integration-ci |