-
Notifications
You must be signed in to change notification settings - Fork 102
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
36 additions
and
49 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
channels: | ||
- conda-forge | ||
- nvidia | ||
# - https://conda.anaconda.org/sleap/label/dev | ||
- https://conda.anaconda.org/sleap/label/dev | ||
- sleap | ||
- anaconda |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,9 +26,11 @@ jobs: | |
include: | ||
# Use this condarc as default | ||
- condarc: .conda/condarc.yaml | ||
- pyver: "3.7" | ||
# Use special condarc if macos | ||
- os: "macos-14" | ||
condarc: .conda_mac/condarc.yaml | ||
pyver: "3.9" | ||
steps: | ||
# Setup | ||
- uses: actions/checkout@v2 | ||
|
@@ -40,20 +42,24 @@ jobs: | |
with: | ||
path: ~/conda_pkgs_dir | ||
key: ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{ hashFiles('environment_build.yml', 'requirements.txt') }} | ||
|
||
- name: Setup Miniconda | ||
# https://github.com/conda-incubator/setup-miniconda | ||
uses: conda-incubator/[email protected] | ||
uses: conda-incubator/[email protected] | ||
with: | ||
python-version: 3.7 | ||
use-only-tar-bz2: true # IMPORTANT: This needs to be set for caching to work properly! | ||
environment-file: environment_build.yml | ||
miniforge-version: latest | ||
condarc-file: ${{ matrix.condarc }} | ||
environment-file: environment_build.yml | ||
activate-environment: sleap_ci | ||
python-version: ${{ matrix.pyver }} | ||
conda-solver: "libmamba" | ||
use-only-tar-bz2: true # IMPORTANT: This needs to be set for caching to work properly! | ||
|
||
- name: Print environment info | ||
shell: bash -l {0} | ||
run: | | ||
which python | ||
conda info | ||
conda list | ||
# Build pip wheel (Not Windows) | ||
- name: Build pip wheel (Not Windows) | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,37 +11,20 @@ on: | |
- "environment_no_cuda.yml" | ||
- "requirements.txt" | ||
- "dev_requirements.txt" | ||
push: | ||
branches: | ||
- master | ||
- develop | ||
paths: | ||
- "sleap/**" | ||
- "tests/**" | ||
- ".github/workflows/ci.yml" | ||
- "environment_no_cuda.yml" | ||
- "requirements.txt" | ||
- "dev_requirements.txt" | ||
# push: | ||
# branches: | ||
# - main | ||
# - develop | ||
# paths: | ||
# - "sleap/**" | ||
# - "tests/**" | ||
# - ".github/workflows/ci.yml" | ||
# - "environment_no_cuda.yml" | ||
# - "requirements.txt" | ||
# - "dev_requirements.txt" | ||
|
||
jobs: | ||
type_check: | ||
name: Type Check | ||
runs-on: "ubuntu-22.04" | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v3 | ||
- name: Set up Python 3.7 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.7 | ||
- name: Install Dependencies | ||
run: | | ||
pip install mypy | ||
- name: Run MyPy | ||
# TODO: remove this once all MyPy errors get fixed | ||
continue-on-error: true | ||
run: | | ||
mypy --follow-imports=skip --ignore-missing-imports sleap tests | ||
# Lint | ||
lint: | ||
name: Lint | ||
runs-on: "ubuntu-22.04" | ||
|
@@ -59,6 +42,8 @@ jobs: | |
- name: Run Black | ||
run: | | ||
black --check sleap tests | ||
# Tests | ||
tests: | ||
name: Tests (${{ matrix.os }}) | ||
runs-on: ${{ matrix.os }} | ||
|
@@ -80,25 +65,22 @@ jobs: | |
- name: Checkout repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup Micromamba | ||
# https://github.com/mamba-org/setup-micromamba | ||
uses: mamba-org/setup-micromamba@v1 | ||
- name: Setup Conda | ||
uses: conda-incubator/[email protected] | ||
with: | ||
micromamba-version: '1.4.6-0' | ||
miniforge-version: latest | ||
conda-solver: "libmamba" | ||
environment-file: ${{ matrix.env_file }} | ||
environment-name: sleap_ci | ||
init-shell: >- | ||
bash | ||
powershell | ||
post-cleanup: all | ||
activate-environment: sleap_ci | ||
use-only-tar-bz2: true # IMPORTANT: This needs to be set for caching to work properly! | ||
|
||
# Print environment info | ||
- name: Print environment info | ||
shell: bash -l {0} | ||
run: | | ||
which python | ||
micromamba info | ||
micromamba list | ||
conda info | ||
conda list | ||
pip freeze | ||
# Test environment | ||
|
@@ -109,7 +91,7 @@ jobs: | |
# Upload coverage | ||
- name: Upload coverage | ||
uses: codecov/codecov-action@v1 | ||
uses: codecov/codecov-action@v4 | ||
if: matrix.os == 'ubuntu-22.04' | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
|