-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- make ocv rust image less cluttered
- add GH workflow for rust pr checks - cargofmt: fix formatting - add crate caching - change deprecated fmt option
- Loading branch information
Showing
6 changed files
with
93 additions
and
16 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
--- | ||
name: PR checks for rust server backend | ||
|
||
on: | ||
pull_request: | ||
|
||
concurrency: | ||
group: '${{ github.workflow }} @ ${{ github.head_ref || github.ref }}' | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
changed-files: | ||
name: Check changes for rust server app | ||
runs-on: minafoundation-default-interruptible-runners | ||
steps: | ||
- name: 📥 Checkout | ||
uses: actions/checkout@v4 | ||
- uses: tj-actions/changed-files@v39 | ||
id: changed | ||
with: | ||
files_yaml: | | ||
server: | ||
- 'server/**' | ||
write_output_files: true | ||
outputs: | ||
modified_keys: ${{ steps.changed.outputs.modified_keys }} | ||
rust-checks: | ||
env: | ||
CARGO_TERM_COLOR: always | ||
needs: changed-files | ||
if: needs.changed-files.outputs.modified_keys != '[]' && needs.changed-files.outputs.modified_keys != '' | ||
name: Rust PR Checks | ||
runs-on: minafoundation-default-interruptible-runners | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- run: rustup toolchain install stable --profile minimal | ||
- uses: Swatinem/rust-cache@v2 | ||
with: | ||
workspaces: ./server | ||
- name: ✍️ Check formatting | ||
run: cargo fmt --all -- --check | ||
working-directory: ./server | ||
- name: 🧐 Check linting | ||
run: cargo clippy -- -D warnings -D clippy::unwrap_used | ||
working-directory: ./server | ||
- name: 🏗️ Build the app | ||
run: cargo build --release | ||
working-directory: ./server | ||
- name: 📋 Run the tests | ||
run: cargo test --locked --all-features --all-targets | ||
working-directory: ./server |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,7 +21,7 @@ jobs: | |
runs-on: minafoundation-default-runners | ||
steps: | ||
- name: 📥 Checkout | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
- name: 🦀 Get on-chain-voting server version from Cargo.toml. | ||
id: ocv-server | ||
uses: dante-signal31/[email protected] | ||
|
@@ -56,8 +56,8 @@ jobs: | |
runs-on: minafoundation-default-runners | ||
steps: | ||
- name: 📥 Checkout | ||
uses: actions/checkout@v3 | ||
- name: 🦀 Get on-chain-voting web version from package.json | ||
uses: actions/checkout@v4 | ||
- name: 🇹🇸 Get on-chain-voting web version from package.json | ||
id: ocv-web | ||
uses: martinbeentjes/[email protected] | ||
with: | ||
|
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
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
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
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