-
Notifications
You must be signed in to change notification settings - Fork 0
80 lines (63 loc) · 2.4 KB
/
pypi-test.yml
File metadata and controls
80 lines (63 loc) · 2.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
name: PyPI package tests
on:
# Run daily, at 00:00.
schedule:
- cron: '0 0 * * *'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Allow only one concurrent workflow, skipping runs queued between the run
# in-progress and latest queued. And cancel in-progress runs.
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
permissions:
contents: read
# Set the environment variables to be used in all jobs defined in this workflow
env:
CI_BRANCH: ${{ github.head_ref || github.ref_name }}
DEFAULT_BRANCH: ${{ github.event.repository.default_branch }}
jobs:
# Job 1: Test installation from PyPI on multiple OS
pypi-package-tests:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repository
uses: actions/checkout@v5
- name: Set up pixi
uses: ./.github/actions/setup-pixi
with:
environments: ''
activate-environment: ''
run-install: false
frozen: false
- name: Init pixi project
run: pixi init easydiffraction
- name: Add Python 3.14 from Conda
working-directory: easydiffraction
run: pixi add "python=3.14"
- name: Add other Conda dependencies
working-directory: easydiffraction
run: pixi add gsl
- name: Add easydiffraction from PyPI
working-directory: easydiffraction
run: pixi add --pypi "easydiffraction"
- name: Add dev dependencies from PyPI
working-directory: easydiffraction
run: pixi add --pypi pytest pytest-xdist
- name: Add Pixi task as a shortcut
working-directory: easydiffraction
run: pixi task add easydiffraction "python -m easydiffraction"
- name: Run unit tests to verify the installation
working-directory: easydiffraction
run: pixi run python -m pytest ../tests/unit/ --color=yes -v
- name: Run integration tests to verify the installation
working-directory: easydiffraction
run: pixi run python -m pytest ../tests/integration/ --color=yes -n auto
# Job 2: Build and publish dashboard (reusable workflow)
run-reusable-workflows:
needs: pypi-package-tests # depend on previous job
uses: ./.github/workflows/dashboard.yml
secrets: inherit