test action #485
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: Run Tests | |
on: [push, pull_request] | |
jobs: | |
build_and_test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: nschloe/action-cached-lfs-checkout@v1 | |
- uses: actions/setup-python@v4 | |
name: Install Python | |
with: | |
python-version: '3.10' | |
- uses: ./.github/actions/setup-rust | |
with: | |
cache: true | |
- name: Install dependencies | |
run: | | |
sudo pip install --upgrade pip | |
pip install --user coverage pytest hypothesis wheel | |
- name: Test Rust package | |
run: | | |
cd ${GITHUB_WORKSPACE}/snapatac2-core | |
cargo test --release --all --no-fail-fast | |
- name: Build wheel files | |
run: | | |
cd ${GITHUB_WORKSPACE}/snapatac2-python | |
mkdir ${GITHUB_WORKSPACE}/wheel_files | |
pip wheel . --wheel-dir ${GITHUB_WORKSPACE}/wheel_files | |
- name: Test Python package | |
run: | | |
pip install --user ${GITHUB_WORKSPACE}/wheel_files/*.whl | |
coverage run -m pytest ${GITHUB_WORKSPACE}/snapatac2-python/tests | |
- name: Upload Coverage to Codecov | |
uses: codecov/codecov-action@v3 | |
- name: Upload wheel files as artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: wheel-files | |
path: ./wheel_files/snapatac2*.whl |