Skip to content

2023 10 30 more

2023 10 30 more #87

Workflow file for this run

name: rust
on:
push:
branches:
- main
pull_request:
branches: [main]
types: [opened, synchronize]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose
lint: # inspired by https://github.com/EmbarkStudios/rust-gpu/blob/main/.github/workflows/ci.yaml
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install rustup components
run: rustup component add rustfmt clippy
- name: Install rust-toolchain # cargo version is a random command that forces the installation of rust-toolchain
run: cargo version
- name: cargo fetch
run: cargo fetch
- name: Rustfmt
run: cargo fmt --all -- --check
- name: Check docs are valid
run: RUSTDOCFLAGS=-Dwarnings cargo doc --no-deps
- name: Clippy
run: cargo clippy
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: superfly/flyctl-actions/setup-flyctl@master
- name: deploy
if: ${{ github.event_name == 'push' }}
run: flyctl deploy --remote-only -c back-fly.toml .
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}