From df205492b4a58a1bba41f0189a61af6b54374db3 Mon Sep 17 00:00:00 2001 From: Kapil Thangavelu Date: Mon, 3 Jan 2022 07:43:52 -0600 Subject: [PATCH] feat: use github actions for basic ci (#38) --- .github/workflows/ci.yml | 47 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..aa71e45 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,47 @@ +name: CI + +on: + push: + branches: + - master + pull_request: + branches: + - master + +jobs: + Lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions-rs/toolchain@v1 + with: + toolchain: stable + components: rustfmt + - name: Check Formatting + run: rustfmt --check src/*rs + + Test: + strategy: + matrix: + os: [ubuntu-latest, macos-latest, windows-latest] + python-version: [3.9] + include: + - os: ubuntu-latest + python-version: "3.10" + - os: ubuntu-latest + python-version: 3.8 + - os: ubuntu-latest + python-version: 3.7 + runs-on: "${{ matrix.os }}" + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - uses: actions-rs/toolchain@v1 + with: + toolchain: stable + - run: pip install pipenv + - run: pipenv install --dev + - run: pipenv run maturin develop + - run: pipenv run pytest -v tests