Merge pull request #107 from xp-bot/dev #168
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 Build | |
on: | |
push: | |
branches: [ "master", "dev" ] | |
pull_request: | |
branches: [ "master", "dev" ] | |
defaults: | |
run: | |
working-directory: xp-bot | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Cargo Cache | |
uses: actions/cache@v1 | |
with: | |
path: ~/.cargo | |
key: ${{ runner.os }}-cargo-${{ hashFiles('Cargo.toml') }} | |
restore-keys: | | |
${{ runner.os }}-cargo-${{ hashFiles('Cargo.toml') }} | |
${{ runner.os }}-cargo | |
- name: Cargo Target Cache | |
uses: actions/cache@v1 | |
with: | |
path: target | |
key: ${{ runner.os }}-cargo-target-${{ hashFiles('Cargo.toml') }} | |
restore-keys: | | |
${{ runner.os }}-cargo-target-${{ hashFiles('Cargo.toml') }} | |
${{ runner.os }}-cargo-target | |
- name: Build | |
run: cargo check -p xp-bot --verbose | |
- name: Run tests | |
run: cargo test -p xp-bot --verbose |