Skip to content

run codecov only for regulr wfl #1547

run codecov only for regulr wfl

run codecov only for regulr wfl #1547

Workflow file for this run

name: CI
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
test:
name: "Tests Core"
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest"]
python-version: ["3.9", "3.12"]
pytest_opts: ["--workers 4 --tests-per-worker 1"]
steps:
- name: Checkout source
uses: actions/checkout@v4
- name: Setup python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
architecture: x64
- name: Set up poetry
uses: snok/install-poetry@v1
- name: Install
run: poetry install --without docs
- name: set numba parallel flags
run: |
echo "NUMBA_NUM_THREADS=1" >> $GITHUB_ENV
- name: Setup r2u
uses: eddelbuettel/github-actions/r2u-setup@master
- name: install R packages
run: Rscript -e 'install.packages(c("fixest", "broom", "did2s", "clubSandwich", "wildrwolf", "ivDiag"))'
shell: bash
- name: Run tests
run: |
poetry run pytest tests -m "not (extended or slow or plots)" --cov=pyfixest --cov-report=xml
- name: Upload to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
partial: true
flags: core-tests
test_slow:
name: "Tests vs fixest"
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest"]
python-version: ["3.9", "3.12"]
pytest_opts: ["--workers 4 --tests-per-worker 1"]
steps:
- name: Checkout source
uses: actions/checkout@v4
- name: Setup python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
architecture: x64
- name: Set up poetry
uses: snok/install-poetry@v1
- name: Install
run: poetry install --without docs
- name: set numba parallel flags
run: |
echo "NUMBA_NUM_THREADS=1" >> $GITHUB_ENV
- name: Setup r2u
uses: eddelbuettel/github-actions/r2u-setup@master
- name: install R packages
run: Rscript -e 'install.packages(c("fixest", "broom", "did2s", "clubSandwich", "wildrwolf", "ivDiag"))'
shell: bash
- name: Run tests
run: |
poetry run pytest tests -m slow --cov=./ --cov-report=xml
#- name: Upload to Codecov
# uses: codecov/codecov-action@v4
# with:
# token: ${{ secrets.CODECOV_TOKEN }}
# partial: true
# flags: tests-vs-fixest
test_notebooks:
name: "Test Notebooks"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: "3.12"
- name: Set up poetry
uses: snok/install-poetry@v1
- name: Install dependencies
run: poetry install
- name: Set up poetry
uses: snok/install-poetry@v1
- name: Install
run: poetry install --without docs
- name: set numba parallel flags
run: |
echo "NUMBA_NUM_THREADS=1" >> $GITHUB_ENV
- name: Setup r2u
uses: eddelbuettel/github-actions/r2u-setup@master
- name: install R packages
run: Rscript -e 'install.packages(c("fixest", "broom", "did2s", "clubSandwich", "wildrwolf", "ivDiag"))'
shell: bash
- name: Install TeXlive
run: sudo apt-get update && sudo apt-get install texlive texlive-publishers texlive-science latexmk cm-super
- name: Run notebooks
run: |
poetry install --with docs
poetry run python scripts/run_notebooks.py
build-docs:
name: "Build Docs"
runs-on: ubuntu-latest
needs: ["test"]
steps:
- name: Checkout source
uses: actions/checkout@v4
- name: Setup python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Set up poetry
uses: snok/install-poetry@v1
- name: Install dependencies
run: poetry install --with docs
- name: Set up Quarto
uses: quarto-dev/quarto-actions/setup@v2
- name: install tinytex
run: |
quarto install tinytex
- name: Compile docstrings with quartodoc
run : |
poetry run quartodoc build --verbose --config docs/_quarto.yml
- name: Render docs
run: |
poetry run quarto render docs
- name: Save docs artifact
uses: actions/upload-artifact@v4
with:
name: docs-html
path: docs/_site
publish-docs:
name: "Publish Docs"
runs-on: ubuntu-latest
permissions:
contents: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
needs: ["build-docs", "test"]
if: github.ref == 'refs/heads/master'
steps:
- name: Download docs artifact
uses: actions/download-artifact@v4
with:
name: docs-html
path: docs/_site
- name: Publish docs to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/_site