Skip to content

make install steps consistent #404

make install steps consistent

make install steps consistent #404

Workflow file for this run

# Workflow to automate installation and unit testing of DeltaMetrics on various python versions and operating systems
name: build
on:
push:
pull_request:
schedule:
- cron: '0 0 1 * *' # run workflow at 12AM on first day of every month
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ['3.8', '3.9', '3.10']
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
pip install pytest pytest-cov coveralls
pip install -r requirements.txt
- name: Install DeltaMetrics
run: |
python setup.py install
- name: Test with pytest
run: |
pytest --cov=deltametrics/ --cov-report=xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml
env_vars: OS,PYTHON
name: codecov-umbrella
fail_ci_if_error: false
docs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Set up Python 3.9
uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r requirements-docs.txt
sudo apt update -y && sudo apt install -y latexmk texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended dvipng
- name: Install DeltaMetrics
run: |
python setup.py install
- name: Build and test documentation
run: |
(cd docs && make docs)
- name: Debug
run: |
echo $REF
echo $EVENT_NAME
echo ${{ github.event_name == 'push' }}
echo ${{ github.ref == 'refs/heads/develop' }}
echo ${{ github.event_name == 'push' && github.ref == 'refs/heads/develop' }}
- name: Deploy to GitHub Pages
uses: JamesIves/[email protected]
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/develop' }}
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
EVENT_NAME: ${{ github.event_name }}
REF: ${{ github.ref }}
BRANCH: gh-pages
FOLDER: docs/build/html