Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 0 additions & 37 deletions .github/workflows/build.yml

This file was deleted.

38 changes: 0 additions & 38 deletions .github/workflows/lint.yml

This file was deleted.

71 changes: 62 additions & 9 deletions .github/workflows/pr-build.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
on: [pull_request]
on:
pull_request: {}
push:
branches:
- 'main'
name: Test rust

jobs:
build_and_test:
name: Rust project
build_all_features:
name: Build all features
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand All @@ -20,11 +24,60 @@ jobs:
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-
- name: Add required index.html
run: |
touch ./static/index.html
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}-all
- name: Run cargo build
run: cargo build

- name: Run lint
run: cargo clippy -- -D warnings
- name: Run cargo test
run: cargo test
build_sqlite:
name: Build sqlite
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
- name: Set up cargo cache
uses: actions/cache@v3
continue-on-error: false
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}-sqlite
- name: Run cargo build
run: cargo build --no-default-features --features sqlite
- name: Run lint
run: cargo clippy --no-default-features --features sqlite -- -D warnings
- name: Run cargo test
run: cargo test --no-default-features --features sqlite
build_postgres:
name: Build postgres
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
- name: Set up cargo cache
uses: actions/cache@v3
continue-on-error: false
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}-postgres
- name: Run cargo build
run: cargo build --no-default-features --features postgresql
- name: Run lint
run: cargo clippy --no-default-features --features postgresql -- -D warnings
- name: Run cargo test
run: cargo test --no-default-features --features postgresql
40 changes: 0 additions & 40 deletions .github/workflows/test.yml

This file was deleted.

77 changes: 74 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading