mirror of
https://github.com/actix/examples
synced 2024-11-23 22:41:07 +01:00
40b6327e65
Bumps [taiki-e/install-action](https://github.com/taiki-e/install-action) from 2.44.35 to 2.44.44. - [Release notes](https://github.com/taiki-e/install-action/releases) - [Changelog](https://github.com/taiki-e/install-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/taiki-e/install-action/compare/v2.44.35...v2.44.44) --- updated-dependencies: - dependency-name: taiki-e/install-action dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
73 lines
1.9 KiB
YAML
73 lines
1.9 KiB
YAML
name: CI
|
|
|
|
on:
|
|
pull_request:
|
|
types: [opened, synchronize, reopened]
|
|
merge_group:
|
|
types: [checks_requested]
|
|
push:
|
|
branches: [master]
|
|
|
|
jobs:
|
|
build_and_test:
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
version: [stable]
|
|
|
|
name: ${{ matrix.version }}
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Install Rust (${{ matrix.version }})
|
|
uses: actions-rust-lang/setup-rust-toolchain@v1.10.1
|
|
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/redis-github-action@1.8.0
|
|
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/install-action@v2.44.44
|
|
with:
|
|
tool: cargo-ci-cache-clean
|
|
|
|
- name: CI cache clean
|
|
run: cargo-ci-cache-clean
|