Skip to content

Update main.yml

Update main.yml #31

Workflow file for this run

name: CI for Cool-Graph
on:
push:
branches:
- main
pull_request:
branches:
- main
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Set up Miniconda
uses: conda-incubator/setup-miniconda@v2
with:
auto-activate-base: false
environment-file: environment.yml
python-version: 3.8
- name: Install dependencies
run: |
conda env update --file environment.yml --name cool-graph-env
conda activate cool-graph-env
- name: Run tests
run: |
pytest
continue-on-error: true
release:
runs-on: ubuntu-latest
needs: build
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Set up Miniconda
uses: conda-incubator/setup-miniconda@v2
with:
auto-activate-base: false
environment-file: environment.yml
python-version: 3.8
- name: Install build dependencies
run: |
conda env update --file environment.yml --name cool-graph-env
conda activate cool-graph-env
- name: Build package
run: |
python setup.py sdist bdist_wheel
- name: Publish to PyPI
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: |
python -m twine upload dist/*