dev: check formatting before running tests

This commit is contained in:
Chris Midgley 2021-08-21 11:12:58 +01:00 committed by Adrian Wielgosik
parent 792a0d6502
commit 9fd4f097f8
2 changed files with 16 additions and 18 deletions

View File

@ -40,6 +40,18 @@ jobs:
sudo apt-get dist-upgrade sudo apt-get dist-upgrade
sudo apt install -y libasound2-dev libxcb-shape0-dev libxcb-xfixes0-dev mesa-vulkan-drivers sudo apt install -y libasound2-dev libxcb-shape0-dev libxcb-xfixes0-dev mesa-vulkan-drivers
- name: Check formatting
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
- name: Check clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: --all --tests -- -D warnings
- name: Run tests with image tests - name: Run tests with image tests
if: ${{ matrix.os.img_tests }} if: ${{ matrix.os.img_tests }}
uses: actions-rs/cargo@v1 uses: actions-rs/cargo@v1
@ -53,23 +65,9 @@ jobs:
with: with:
command: test command: test
- name: Upload images - name: Upload images
if: ${{ failure() }} if: ${{ failure() }}
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v2
with: with:
name: swf_images name: swf_images
path: tests/**/*.png.updated path: tests/**/*.png.updated
- name: Check clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: --all --tests -- -D warnings
- name: Check formatting
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check

View File

@ -58,10 +58,10 @@ jobs:
npm run bootstrap npm run bootstrap
npm run build npm run build
- name: Run tests
working-directory: web
run: npm test
- name: Check formatting - name: Check formatting
working-directory: web working-directory: web
run: npm run lint run: npm run lint
- name: Run tests
working-directory: web
run: npm test