fmt #42
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: ci | |
on: | |
pull_request: | |
branches: | |
- master | |
- prerelease | |
push: | |
branches: | |
- master | |
jobs: | |
rust: | |
runs-on: ubuntu-latest | |
container: ubuntu | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install tools | |
run: | | |
apt-get update | |
apt-get install -y curl build-essential pkg-config libssl-dev git | |
env: | |
DEBIAN_FRONTEND: noninteractive | |
- name: Install Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
components: rustfmt | |
default: true | |
- name: Install python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.8 | |
architecture: x64 | |
- name: Check which Python we use | |
run: | | |
echo $(which python) | |
ls $(dirname $(which python)) | |
- name: Install other dependent tools | |
run: | | |
python -m pip install poetry | |
cargo install just | |
- name: Install python dependencies | |
run: just bootstrap-python | |
- name: Is the code formatted? | |
uses: actions-rs/cargo@v1 | |
with: | |
command: fmt | |
args: --all --manifest-path native/Cargo.toml -- --check -q | |
- name: Run tests | |
run: just test |