Packaging of Graphium 3.0 #2364
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: test | |
on: | |
push: | |
branches: ["main"] | |
tags: ["*"] | |
pull_request: | |
branches: | |
- "*" | |
- "!gh-pages" | |
schedule: | |
- cron: "0 4 * * *" | |
env: | |
ENV_FILE: "env.yml" | |
jobs: | |
test: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [windows-latest] # ubuntu-latest, macos-latest | |
python-version: ["3.11"] # -> Will re-enable support for py312 once pyg is released, "3.10", | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 30 | |
defaults: | |
run: | |
shell: bash -l {0} | |
name: | | |
regular_env - | |
python=${{ matrix.python-version }} - | |
os=${{ matrix.os }} | |
steps: | |
- name: Checkout the code | |
uses: actions/checkout@v3 | |
- name: Set OS-specific environment file to use | |
run: | | |
if [ "${{ matrix.os }}" == "windows-latest" ]; then | |
echo "ENV_FILE=env_windows.yml" >> $GITHUB_ENV; | |
fi | |
- name: Setup mamba | |
uses: mamba-org/setup-micromamba@v1 | |
with: | |
environment-file: ${{ env.ENV_FILE }} | |
environment-name: graphium | |
cache-environment: true | |
cache-downloads: true | |
create-args: >- | |
python=${{ matrix.python-version }} | |
# To prevent issues where Windows will re-use old/cached versions of RDKit | |
- name: Update rdkit version | |
run: | | |
micromamba install --force-reinstall rdkit=2024.03.4 | |
if: matrix.os == 'windows-latest' | |
- name: Install library | |
run: python -m pip install --no-deps --no-build-isolation -e . -v # `-e` required for correct `coverage` run. | |
- name: Run tests | |
run: | | |
python -c "import rdkit; print('RDKit version:', rdkit.__version__)" | |
pytest | |
- name: Test CLI | |
run: graphium --help | |
- name: Test building the doc | |
run: mkdocs build | |
- name: Codecov Upload | |
uses: codecov/codecov-action@v3 | |
with: | |
files: ./coverage.xml | |
flags: unittests | |
name: codecov-umbrella | |
fail_ci_if_error: false | |
verbose: false | |
env_vars: ${{ matrix.python-version }} |