disable numba jit for code run on jit for full coverage #2112
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: 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 | |
- uses: prefix-dev/[email protected] | |
with: | |
pixi-version: v0.41.4 | |
cache: true | |
- name: set numba parallel flags | |
run: echo "NUMBA_NUM_THREADS=1" >> $GITHUB_ENV | |
- name: Setup r2u | |
uses: eddelbuettel/github-actions/r2u-setup@master | |
- name: Print R version | |
run: Rscript -e 'R.version' | |
- name: Install R packages | |
run: | | |
R_LIB_PATH="${{ github.workspace }}/.pixi/envs/dev/lib/R/library" | |
mkdir -p $R_LIB_PATH | |
Rscript -e ".libPaths('$R_LIB_PATH'); install.packages(c('fixest', 'broom','did2s', 'wildrwolf', 'ivDiag', 'car'), lib='/home/runner/work/pyfixest/pyfixest/.pixi/envs/dev/lib/R/library')" | |
Rscript -e ".libPaths('$R_LIB_PATH'); install.packages('ritest', lib='/home/runner/work/pyfixest/pyfixest/.pixi/envs/dev/lib/R/library', repos = c('https://grantmcdermott.r-universe.dev'))" | |
- name: Run 'regular' tests | |
run: | | |
pixi run tests-regular | |
- name: Upload coverage to Codecov (partial) | |
uses: codecov/codecov-action@v4 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
partial: true | |
flags: core-tests | |
files: coverage.xml | |
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 | |
- uses: prefix-dev/[email protected] | |
with: | |
pixi-version: v0.41.4 | |
cache: true | |
- 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: | | |
R_LIB_PATH="${{ github.workspace }}/.pixi/envs/dev/lib/R/library" | |
mkdir -p $R_LIB_PATH | |
Rscript -e ".libPaths('$R_LIB_PATH'); install.packages(c('fixest', 'broom','did2s', 'wildrwolf', 'ivDiag', 'car'), lib='/home/runner/work/pyfixest/pyfixest/.pixi/envs/dev/lib/R/library')" | |
Rscript -e ".libPaths('$R_LIB_PATH'); install.packages('ritest', lib='/home/runner/work/pyfixest/pyfixest/.pixi/envs/dev/lib/R/library', repos = c('https://grantmcdermott.r-universe.dev'))" | |
- name: Run tests against r | |
run: | | |
pixi run tests-against-r | |
- name: Upload coverage to Codecov (partial) | |
uses: codecov/codecov-action@v4 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
partial: true | |
flags: tests-vs-r | |
files: coverage.xml | |
merge_coverage: | |
name: "Merge Coverage" | |
runs-on: ubuntu-latest | |
needs: [test, test_slow] | |
steps: | |
- name: Final coverage merge | |
uses: codecov/codecov-action@v4 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
partial: false | |
flags: final | |
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" | |
- uses: prefix-dev/[email protected] | |
with: | |
pixi-version: v0.41.4 | |
cache: true | |
- name: Set up Quarto | |
uses: quarto-dev/quarto-actions/setup@v2 | |
- name: install tinytex | |
run: | | |
quarto install tinytex | |
- name: Compile docstrings with quartodoc | |
run: | | |
pixi run docs-build | |
- name: Render docs | |
run: | | |
pixi run docs-render | |
- 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 |