Skip to content

refactor(estimation): explicit array and weight domains #3858

refactor(estimation): explicit array and weight domains

refactor(estimation): explicit array and weight domains #3858

Workflow file for this run

name: CI
on:
push:
branches:
- master
pull_request:
branches:
- master
concurrency:
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
test-python:
name: "Tests Python (${{ matrix.environment }}, ${{ matrix.os }})"
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
environment: [py310, py314]
os: [ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@v7
- uses: prefix-dev/setup-pixi@v0.10.2
with:
pixi-version: v0.76.2
cache: true
cache-write: ${{ github.event_name == 'push' && github.ref_name == 'master' }}
frozen: true
environments: ${{ matrix.environment }}
- name: Run tests
run: pixi run -e ${{ matrix.environment }} test-py
env:
PYTEST_XDIST_AUTO_NUM_WORKERS: 4
- name: Upload coverage to Codecov (partial)
if: matrix.environment == 'py314' && matrix.os == 'ubuntu-latest'
uses: codecov/codecov-action@v7
with:
token: ${{ secrets.CODECOV_TOKEN }}
partial: true
flags: core-tests
files: coverage.xml
test-r:
name: "Tests vs R (${{ matrix.test-task }})"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
test-task: [test-r-core-other, test-r-extended, test-r-fixest, test-r-hac]
steps:
- uses: actions/checkout@v7
- uses: prefix-dev/setup-pixi@v0.10.2
with:
pixi-version: v0.76.2
cache: true
cache-write: ${{ github.event_name == 'push' && github.ref_name == 'master' }}
frozen: true
environments: py312-r
- name: Run fast R preflight
if: matrix.test-task == 'test-r-fixest'
run: pixi run -e py312-r test-r-fixest-fast
- name: Run ${{ matrix.test-task }}
run: pixi run -e py312-r ${{ matrix.test-task }}
env:
PYTEST_XDIST_AUTO_NUM_WORKERS: 4
- name: Upload coverage to Codecov (partial)
uses: codecov/codecov-action@v7
with:
token: ${{ secrets.CODECOV_TOKEN }}
partial: true
flags: ${{ matrix.test-task }}
files: coverage.xml
merge_coverage:
name: "Merge Coverage"
runs-on: ubuntu-latest
needs: [test-python, test-r]
steps:
- name: Final coverage merge
uses: codecov/codecov-action@v7
with:
token: ${{ secrets.CODECOV_TOKEN }}
partial: false
flags: final
build-docs:
name: "Build Docs"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: prefix-dev/setup-pixi@v0.10.2
with:
pixi-version: v0.76.2
cache: true
cache-write: ${{ github.event_name == 'push' && github.ref_name == 'master' }}
frozen: true
environments: docs
- name: Build and render docs
run: pixi run -e docs docs-render
- name: Save docs artifact
uses: actions/upload-artifact@v7
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-python"]
if: github.ref == 'refs/heads/master'
steps:
- name: Download docs artifact
uses: actions/download-artifact@v8
with:
name: docs-html
path: docs/_site
- name: Publish docs to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/_site