Add Publish Workflows #5
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: server | |
on: | |
push: | |
branches: ['main'] | |
pull_request: | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
defaults: | |
run: | |
working-directory: server | |
jobs: | |
ci: | |
runs-on: minafoundation-default-runners | |
# runs-on: ${{ matrix.os }} | |
# strategy: | |
# fail-fast: false | |
# matrix: | |
# rust: [stable, beta, nightly] | |
# os: [ubuntu-latest, windows-latest, macos-latest] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: ${{ matrix.rust }} | |
profile: minimal | |
override: true | |
components: rustfmt, clippy | |
- uses: davidB/rust-cargo-make@v1 | |
- name: Set up cargo cache | |
uses: actions/cache@v3 | |
continue-on-error: false | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
restore-keys: ${{ runner.os }}-cargo- | |
- name: Run clippy | |
working-directory: ./server | |
run: cargo make clippy | |
- name: Run CI | |
working-directory: ./server | |
run: cargo make |