You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
45 lines
968 B
YAML
45 lines
968 B
YAML
name: Build and Test
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
branches: [ main, develop, actions ]
|
|
pull_request:
|
|
branches: [ main, develop, actions ]
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
|
|
jobs:
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Set up toolchain
|
|
uses: actions-rs/toolchain@v1
|
|
with:
|
|
toolchain: stable
|
|
override: true
|
|
- name: Cache build data
|
|
uses: actions/cache@v2
|
|
with:
|
|
path: |
|
|
target
|
|
~/.cargo/
|
|
key: ${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-cargo-
|
|
|
|
- name: Build
|
|
run: cargo build --verbose
|
|
|
|
- name: Test coreutils
|
|
run: cargo test --verbose --package bot-coreutils
|
|
|
|
- name: Test database
|
|
run: cargo test --verbose --package bot-database
|
|
|
|
- name: Test binary
|
|
run: cargo test --verbose |