Skip to content

Bump actions/checkout from 3 to 4 #197

Bump actions/checkout from 3 to 4

Bump actions/checkout from 3 to 4 #197

Workflow file for this run

name: Continuous Integration
on: [ push, pull_request ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ "3.7", "3.8", "3.9", "3.10", "3.11" ]
steps:
- name: Set deploy environment variable
run: |
# NOTIFICATION_RELEASE_BUILD is also used in setup.py
if [ $GITHUB_REF == "refs/heads/stable" ] && \
[ $GITHUB_EVENT_NAME == "push" ] && \
[ ${{ matrix.python-version }} == "3.10" ]; then
echo "NOTIFICATION_RELEASE_BUILD=1" >> $GITHUB_ENV
else
echo "NOTIFICATION_RELEASE_BUILD=0" >> $GITHUB_ENV
fi
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install -r requirements.txt
pip install -r docs/requirements.txt
pip install -r tests/requirements.txt
pip install -r styling_requirements.txt
python setup.py develop
- name: Linting
run: |
black --diff --check .
pylint notif/
pylint tests/
- name: Test with pytest
run: |
pytest
- name: Upload Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
files: ./coverage.xml
- name: Building doc
run: |
cd docs
./rebuild_html_doc.sh
cd ..
- name: Deploy
if: env.NOTIFICATION_RELEASE_BUILD == '1'
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/_build/html/