diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 430b7ee..de4076c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,7 +16,7 @@ jobs: runs-on: ubuntu-latest services: postgres: - image: postgres:14 + image: postgres:15 ports: - 5432:5432 steps: @@ -26,76 +26,6 @@ jobs: run: | sudo apt-get install libpq-dev -y cargo install sqlx-cli --no-default-features --features postgres - SKIP_DOCKER=true ./scripts/init_db.sh + ./scripts/init_db.sh - name: Run tests run: cargo test - - fmt: - name: Rustfmt - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: dtolnay/rust-toolchain@stable - with: - components: rustfmt - - name: Enforce formatting - run: cargo fmt --check - - clippy: - name: Clippy - runs-on: ubuntu-latest - services: - postgres: - image: postgres:14 - ports: - - 5432:5432 - steps: - - uses: actions/checkout@v3 - - uses: dtolnay/rust-toolchain@stable - with: - components: clippy - - uses: Swatinem/rust-cache@v2 - with: - key: sqlx-${{ env.SQLX_VERSION }} - - name: Install sqlx-cli - run: cargo install sqlx-cli - --version=${{ env.SQLX_VERSION }} - --features ${{ env.SQLX_FEATURES }} - --no-default-features - --locked - - name: Migrate database - run: | - sudo apt-get install libpq-dev -y - SKIP_DOCKER=true ./scripts/init_db.sh - - name: Linting - run: cargo clippy -- -D warnings - - coverage: - name: Code coverage - runs-on: ubuntu-latest - services: - postgres: - image: postgres:14 - ports: - - 5432:5432 - steps: - - name: Checkout repository - uses: actions/checkout@v3 - - uses: dtolnay/rust-toolchain@stable - - name: Install libpq - run: sudo apt-get update && sudo apt-get install postgresql-client -y - - uses: Swatinem/rust-cache@v2 - with: - key: sqlx-${{ env.SQLX_VERSION }} - - name: Install tarpaulin - run: cargo install cargo-tarpaulin - - name: Install sqlx-cli - run: cargo install sqlx-cli - --version=${{ env.SQLX_VERSION }} - --features ${{ env.SQLX_FEATURES }} - --no-default-features - --locked - - name: Migrate database - run: SKIP_DOCKER=true ./scripts/init_db.sh - - name: Generate code coverage - run: cargo tarpaulin --verbose --workspace diff --git a/src/lib.rs b/src/lib.rs index 6a76aba..5d1dce7 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,4 +1,3 @@ pub mod configuration; pub mod routes; pub mod startup; -