chore: fix readme #119
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 | |
on: [push, pull_request] | |
concurrency: | |
group: ${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
format: | |
name: Formatting | |
# Do not run on PRs from the same repo, since `push` already handles them. | |
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != | |
github.repository | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
override: true | |
components: rustfmt | |
- uses: Swatinem/rust-cache@v2 | |
- uses: actions-rs/cargo@v1 | |
with: | |
command: fmt | |
args: --all -- --check | |
test: | |
name: Tests | |
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != | |
github.repository | |
runs-on: ubuntu-latest | |
env: | |
RUST_LOG: "trace" | |
DATABASE_URL: "mysql://root:root@localhost:3306/eludris" | |
SQLX_OFFLINE: 1 | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
override: true | |
- uses: Swatinem/rust-cache@v2 | |
- run: docker-compose -f tests/docker-compose.yml up -d | |
- uses: actions-rs/cargo@v1 | |
with: | |
command: build | |
- uses: actions-rs/cargo@v1 | |
with: | |
command: test | |
clippy: | |
name: Clippy; Destroyer of Realities. | |
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != | |
github.repository | |
runs-on: ubuntu-latest | |
env: | |
RUST_LOG: "trace" | |
DATABASE_URL: "mysql://root:root@localhost:3306/eludris" | |
SQLX_OFFLINE: 1 | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
override: true | |
components: clippy | |
- uses: Swatinem/rust-cache@v2 | |
- run: docker-compose -f tests/docker-compose.yml up -d | |
- uses: actions-rs/cargo@v1 | |
with: | |
command: build | |
- uses: actions-rs/cargo@v1 | |
with: | |
command: clippy | |
args: -- -D warnings |