Integrate GCP to battle-game #295
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: Rust | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
# Checkout our repo | |
- uses: actions/checkout@v2 | |
# Install Rust toolchain with required components | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: nightly | |
components: clippy, rustfmt | |
override: true | |
# Run rustfmt check against our code | |
- name: Rustfmt check | |
working-directory: ./backend | |
run: cargo fmt -- --check -v | |
# Check the code with Clippy | |
- name: Clippy check | |
uses: actions-rs/clippy-check@v1.0.5 | |
with: | |
# GitHub token | |
token: ${{ secrets.GITHUB_TOKEN }} | |
args: --all-features --manifest-path ./backend/Cargo.toml | |
- name: Build | |
run: cargo build --verbose --manifest-path ./backend/Cargo.toml | |
- name: Run tests | |
run: cargo test --verbose --manifest-path ./backend/Cargo.toml |