From 9ee111790cadc5b02a3ddfd4fb058162d7c3fff4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A1niel=20Buga?= Date: Fri, 18 Mar 2022 22:39:21 +0100 Subject: [PATCH] Run cargo check for each pull request that is ready for review --- .github/workflows/pr.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/pr.yml diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml new file mode 100644 index 00000000..1640705c --- /dev/null +++ b/.github/workflows/pr.yml @@ -0,0 +1,32 @@ +on: + pull_request: + types: [opened, synchronize, reopened, ready_for_review] + +name: Pull request checks + +jobs: + check: + name: Rust (${{ matrix.toolchain }}) on ${{ matrix.os }} + if: github.event.pull_request.draft == false + + strategy: + matrix: + os: [ ubuntu-latest, windows-latest, macos-latest ] + toolchain: [ stable ] + + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v2 + + - name: Install dependencies on Ubuntu + if: startsWith(matrix.os, 'ubuntu') + run: sudo apt-get install cmake pkg-config libfreetype6-dev libfontconfig1-dev libxcb-xfixes0-dev libxkbcommon-dev + + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: ${{ matrix.toolchain }} + + - uses: actions-rs/cargo@v1 + with: + command: check