teloxide/.github/workflows/ci.yml

51 lines
1.2 KiB
YAML
Raw Normal View History

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
2019-11-27 15:30:33 +01:00
name: Continuous integration
jobs:
2020-07-02 14:48:37 +02:00
code-checks:
2019-11-27 15:30:33 +01:00
runs-on: ubuntu-latest
steps:
2020-07-03 14:52:16 +02:00
- uses: actions/checkout@v2
2020-07-02 14:57:06 +02:00
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true
components: rustfmt, clippy
2020-07-02 14:48:37 +02:00
- name: Cargo fmt
2020-07-02 14:54:24 +02:00
run: cargo +nightly fmt --all -- --check
2020-07-03 14:50:28 +02:00
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
2020-07-02 14:48:37 +02:00
- name: Cargo clippy
run: cargo clippy --all-targets --all-features -- -D warnings
stable-test:
runs-on: ubuntu-latest
2020-07-02 14:52:42 +02:00
steps:
2020-07-03 14:52:16 +02:00
- uses: actions/checkout@v2
2020-07-03 14:50:28 +02:00
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
2020-07-02 14:52:42 +02:00
- name: Cargo test
run: cargo test --all-features
2020-07-02 14:48:37 +02:00
test-examples:
runs-on: ubuntu-latest
2020-07-02 14:52:42 +02:00
steps:
2020-07-03 14:52:16 +02:00
- uses: actions/checkout@v2
2020-07-03 14:50:28 +02:00
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
2020-07-02 14:52:42 +02:00
- name: Test the examples
2020-07-03 15:37:05 +02:00
run: cd examples && bash test_examples.sh