Use ubuntu-20.04 runner for pull requests #571
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: Pull Requests | |
on: | |
pull_request_target: | |
branches: | |
- master | |
push: | |
branches: | |
- master | |
jobs: | |
build: | |
strategy: | |
matrix: | |
os: [ ubuntu-20.04, windows-latest, macos-latest ] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Setup node 16 for self hosted | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 16 | |
- name: Check out repository | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Set up Rust toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
components: rustfmt | |
override: true | |
profile: minimal | |
- name: Rust Cache | |
uses: Swatinem/[email protected] | |
with: | |
cache-targets: "false" | |
- name: Check formatting | |
uses: actions-rs/cargo@v1 | |
with: | |
command: fmt | |
args: --all -- --check | |
- name: Check compilation | |
uses: actions-rs/cargo@v1 | |
with: | |
command: check | |
- name: Test | |
uses: actions-rs/cargo@v1 | |
with: | |
command: test |