Skip to content

CI

CI #2195

Workflow file for this run

name: CI
on:
pull_request:
push:
branches:
- "main"
- "pre-commit-autoupdate"
- "update-pixi"
tags:
- "*"
schedule:
# daily (`@daily` not supported, see
# https://docs.github.com/en/actions/reference/events-that-trigger-workflows#scheduled-events )
#
# Runs on default/base branch (see
# https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#onschedule )
- cron: "0 0 * * *"
jobs:
pre-commit:
timeout-minutes: 30
runs-on: ubuntu-latest
steps:
- name: Checkout branch
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Set up pixi
uses: prefix-dev/setup-pixi@82d477f15f3a381dbcc8adc1206ce643fe110fb7 # v0.9.3
with:
environments: default lint
- name: pre-commit
run: pixi run pre-commit-run --color=always --show-diff-on-failure
tests:
strategy:
fail-fast: false
matrix:
environment: [
# py310
"py310-pyarrow18-1",
"py310-pyarrow19-1",
"py310-pyarrow20-0",
"py310-pyarrow21-0",
# py311
"py311-pyarrow18-1",
"py311-pyarrow19-1",
"py311-pyarrow20-0",
"py311-pyarrow21-0",
# py312
"py312-pyarrow18-1",
"py312-pyarrow19-1",
"py312-pyarrow20-0",
"py312-pyarrow21-0",
# py313
"py313-pyarrow18-1",
"py313-pyarrow19-1",
"py313-pyarrow20-0",
"py313-pyarrow21-0",
]
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Set up pixi
uses: prefix-dev/setup-pixi@82d477f15f3a381dbcc8adc1206ce643fe110fb7 # v0.9.3
with:
environments: ${{ matrix.environment }} # References the environments defined in pixi.toml
- name: Install repository
run: pixi run -e ${{ matrix.environment }} postinstall
- name: Pytest
run: pixi run -e ${{ matrix.environment }} test-coverage -n auto
- name: Codecov
uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1
with:
file: ./coverage.xml
token: ${{ secrets.CODECOV_TOKEN }}
name: pytest-${{ matrix.environment }}
- name: Issue on failure
uses: actions/github-script@v8
if: ${{ failure() && github.ref == 'refs/heads/main' }}
with:
script: |
github.rest.issues.listForRepo({
owner: context.repo.owner,
repo: context.repo.repo,
state: "open",
labels: "[bot] Daily run"
}).then((issues) => {
if (issues.data.length === 0){
github.rest.issues.create({
owner: context.repo.owner,
repo: context.repo.repo,
title: "Daily run failure",
body: "The daily unit tests failed. See https://github.com/data-engineering-collective/plateau/actions/runs/${{github.run_id}} for details.",
assignees: ["fjetter"],
labels: ["[bot] Daily run"]
})
}
});