CI (nightly) #217
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 (nightly) | |
on: | |
schedule: [cron: "40 1 * * *"] | |
jobs: | |
build_and_test: | |
strategy: | |
fail-fast: false | |
matrix: | |
version: [nightly] | |
name: ${{ matrix.version }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Rust (${{ matrix.version }}) | |
uses: actions-rust-lang/[email protected] | |
with: | |
toolchain: ${{ matrix.version }} | |
- name: Install DB CLI tools | |
run: | | |
cargo install sqlx-cli --no-default-features --features=rustls,sqlite | |
cargo install diesel_cli --no-default-features --features sqlite | |
- name: Create Test DBs | |
env: | |
DATABASE_URL: sqlite://./todo.db | |
run: | | |
sudo apt-get update && sudo apt-get install sqlite3 | |
sqlx database create | |
chmod a+rwx ./todo.db | |
sqlx migrate run --source=./basics/todo/migrations | |
- name: cargo check | |
run: cargo check --workspace --bins --examples --tests | |
timeout-minutes: 30 | |
- name: Start Redis | |
uses: supercharge/[email protected] | |
with: | |
redis-version: 6 | |
- name: cargo test | |
run: cargo test --workspace --all-features --no-fail-fast --exclude=db-diesel -- --nocapture | |
timeout-minutes: 30 | |
- name: cargo test (diesel) | |
env: | |
DATABASE_URL: test.db | |
run: | | |
cd databases/diesel | |
diesel migration run | |
chmod a+rwx test.db | |
cargo test -p=db-diesel --no-fail-fast -- --nocapture | |
timeout-minutes: 10 | |
- name: Install cargo-ci-cache-clean | |
uses: taiki-e/[email protected] | |
with: | |
tool: cargo-ci-cache-clean | |
- name: CI cache clean | |
run: cargo-ci-cache-clean |