Skip to content

Commit

Permalink
fix ci (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
bollwyvl authored Jul 10, 2024
1 parent 610c824 commit 9894977
Show file tree
Hide file tree
Showing 4 changed files with 120 additions and 71 deletions.
116 changes: 116 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
name: CI

on:
push:
branches: [main]
pull_request:
branches: ["*"]
workflow_dispatch:

concurrency:
group: ${{ github.ref }}
cancel-in-progress: true

env:
PYTHONUNBUFFERED: "1"
PIP_DISABLE_PIP_VERSION_CHECK: "1"
CACHE_EPOCH: "0"

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: prefix-dev/setup-pixi@v0.8.1
with:
pixi-version: v0.24.2
cache: true
environments: build
- name: cache (node)
uses: actions/cache@v4
id: cache-node-modules
with:
path: node_modules
key: |
${{ env.CACHE_EPOCH }}-${{ runner.os }}-node_modules-${{ hashFiles('yarn.lock') }}
- run: pixi run dist
- uses: actions/upload-artifact@v4
with:
name: ipfr-${{ github.run_number }}-dist
path: ./dist

lint:
runs-on: ubuntu-latest
needs: [build]
steps:
- uses: actions/checkout@v4
- uses: prefix-dev/setup-pixi@v0.8.1
with:
pixi-version: v0.24.2
cache: true
environments: >-
build
lint
- name: cache (node)
uses: actions/cache@v4
id: cache-node-modules
with:
path: node_modules
key: |
${{ env.CACHE_EPOCH }}-${{ runner.os }}-node_modules-${{ hashFiles('yarn.lock') }}
- run: pixi run lint
- run: rm -rf node_modules/.cache

test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: prefix-dev/setup-pixi@v0.8.1
with:
pixi-version: v0.24.2
cache: true
environments: >-
build
test
- name: cache (node)
uses: actions/cache@v4
id: cache-node-modules
with:
path: node_modules
key: |
${{ env.CACHE_EPOCH }}-${{ runner.os }}-node_modules-${{ hashFiles('yarn.lock') }}
- run: pixi run test
- uses: actions/upload-artifact@v4
if: always()
with:
name: ipfr-${{ github.run_number }}-test
path: ./build/reports

docs:
needs: [build]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: prefix-dev/setup-pixi@v0.8.1
with:
pixi-version: v0.24.2
cache: true
environments: >-
build
docs
- name: cache (node)
uses: actions/cache@v4
id: cache-node-modules
with:
path: node_modules
key: |
${{ env.CACHE_EPOCH }}-${{ runner.os }}-node_modules-${{ hashFiles('yarn.lock') }}
- uses: actions/download-artifact@v4
with:
name: ipfr-${{ github.run_number }}-dist
- run: pixi run docs-lite
- run: pixi run docs-sphinx
- uses: actions/upload-artifact@v4
with:
name: ipfr-${{ github.run_number }}-docs
path: ./build/docs
5 changes: 3 additions & 2 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,9 @@ jobs:
environments: >-
build
docs
- run: pixi run -e docs docs-lite
- run: pixi run -e docs docs
- run: pixi run dist
- run: pixi run docs-lite
- run: pixi run docs
- uses: actions/upload-pages-artifact@v3
with:
path: build/docs
Expand Down
69 changes: 0 additions & 69 deletions .github/workflows/test.yml

This file was deleted.

1 change: 1 addition & 0 deletions pixi.toml
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ depends-on = ["build-js-lib"]
cmd = "pixi r -e test pip-"
inputs = ["pyproject.toml"]
outputs = ["build/pip-freeze/test.txt"]
depends-on = ["build-js-ext"]

[feature.tasks-test.tasks.test-pytest]
cmd = "pytest"
Expand Down

0 comments on commit 9894977

Please sign in to comment.