Merge pull request #1 from frankPairs/fix-lint-errors #8
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: Deploy API to AWS | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Install Rust | |
run: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs -y | sh | |
- name: Run rust linter | |
run: cargo clippy -- -D warnings | |
formatting: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Install Rust | |
run: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs -y | sh | |
- name: Run formatter check | |
run: cargo fmt --all -- --check | |
unit-tests: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Install Rust | |
run: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs -y | sh | |
- name: Run Unit tests | |
run: cargo test --lib --bins | |