Skip to content

Commit 9d0439b

Browse files
committed
Update actions
1 parent cfe630f commit 9d0439b

File tree

4 files changed

+52
-59
lines changed

4 files changed

+52
-59
lines changed

.github/workflows/test.yml

Lines changed: 52 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
name: Test
22

3-
on: [push, pull_request]
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
48

59
jobs:
610

@@ -13,16 +17,16 @@ jobs:
1317
toolchain: stable
1418
profile: minimal
1519
components: rustfmt, clippy
16-
- run:
17-
cargo fmt --all -- check
20+
- run: |
21+
cargo fmt --all -- --check
1822
cargo clippy --tests
1923
for example in examples/*; do (cd $example/; cargo clippy) || exit 1; done
2024
21-
build:
25+
test:
2226
name: python${{ matrix.python-version }}-${{ matrix.platform.python-architecture }} ${{ matrix.platform.os }}
2327
runs-on: ${{ matrix.platform.os }}
2428
strategy:
25-
max-parallel: 12
29+
max-parallel: 16
2630
matrix:
2731
python-version: [3.6, 3.7, 3.8, 3.9]
2832
platform: [
@@ -47,12 +51,50 @@ jobs:
4751
run: cargo build --no-default-features --verbose
4852
- name: Build with default features
4953
run: cargo build --verbose
50-
- name: Install test dependencies
54+
- name: Install numpy and poetry
55+
run: pip install numpy poetry
56+
- name: Run cargo test
57+
run: cargo test --verbose
58+
- name: Test Examples
5159
run: |
52-
python -m pip install -U pip setuptools
53-
pip install setuptools-rust pytest pytest-benchmark tox tox-venv numpy
54-
- name: Test
55-
run: ci/actions/test.sh
60+
for example_dir in examples/*; do
61+
if [ $example != 'examples/linalg' ]; then
62+
pushd $example_dir
63+
poetry install
64+
poetry run maturin develop
65+
poetry run pytest
66+
popd
67+
fi
68+
done
5669
shell: bash
5770
env:
5871
RUST_BACKTRACE: 1
72+
73+
linalg-example:
74+
runs-on: ubuntu-latest
75+
steps:
76+
- uses: actions/checkout@v2
77+
- name: Set up Python
78+
uses: actions/setup-python@v2
79+
with:
80+
python-version: 3.8
81+
- name: Install gfortran
82+
run: |
83+
apt update
84+
apt install -y gfortran
85+
- name: Install Rust
86+
uses: actions-rs/toolchain@v1
87+
with:
88+
toolchain: stable
89+
default: true
90+
- run: rustup set default-host ${{ matrix.platform.rust-target }}
91+
- name: Install numpy and poetry
92+
run: pip install numpy poetry
93+
- name: Test Examples
94+
run: |
95+
cd examples/ndarray-linalg
96+
poetry install
97+
poetry run maturin develop
98+
poetry run pytest
99+
env:
100+
RUST_BACKTRACE: 1

ci/travis/deploy.sh

Lines changed: 0 additions & 13 deletions
This file was deleted.

ci/travis/setup.sh

Lines changed: 0 additions & 16 deletions
This file was deleted.

ci/travis/test.sh

Lines changed: 0 additions & 20 deletions
This file was deleted.

0 commit comments

Comments
 (0)