Fix rust formatting check #20
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: Check rust code formatting | |
on: | |
push: | |
pull_request: | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
check-format: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Test | |
run: echo "abc" >> $GITHUB_ENV | |
- name: Print test | |
run: echo $GITHUB_ENV | |
- name: Set cargo fmt output | |
run: echo cargo fmt --message-format short >> $GITHUB_ENV | |
- name: Print cargo fmt output | |
run: echo $GITHUB_ENV | |
- name: Check cargo fmt output | |
run: if [ -n $$GITHUB_ENV ]; then exit 1; fi |