|
1 | 1 | name: build |
2 | 2 |
|
| 3 | +# What gets published, rather than what is in the working tree. `tests.yml` |
| 4 | +# already lints and tests the sources across the whole matrix; running the same |
| 5 | +# flake8 twice bought no extra signal, so this workflow builds the |
| 6 | +# distributions instead and proves the wheel stands on its own — no source |
| 7 | +# tree, no demos folder, no editable install. |
| 8 | + |
3 | 9 | on: [push] |
4 | 10 |
|
| 11 | +concurrency: |
| 12 | + group: build-${{ github.ref }} |
| 13 | + cancel-in-progress: true |
| 14 | + |
5 | 15 | jobs: |
6 | 16 | build: |
7 | | - runs-on: ${{ matrix.os }} |
8 | | - strategy: |
9 | | - fail-fast: false |
10 | | - matrix: |
11 | | - os: [ubuntu-latest] |
12 | | - python-version: ['3.9', '3.10', '3.11', '3.12'] |
13 | | - |
| 17 | + runs-on: ubuntu-latest |
14 | 18 | steps: |
15 | | - - uses: actions/checkout@v7 |
16 | | - with: |
17 | | - submodules: recursive |
18 | | - - name: Set up Python ${{ matrix.python-version }} |
19 | | - uses: actions/setup-python@v7 |
20 | | - with: |
21 | | - python-version: ${{ matrix.python-version }} |
22 | | - - name: Install package (dev extras) |
23 | | - run: | |
24 | | - python -m pip install --upgrade pip |
25 | | - python -m pip install -e ".[dev]" |
26 | | - - name: Lint with flake8 |
27 | | - run: | |
28 | | - flake8 jupyddl tests --count --select=E9,F63,F7,F82 --show-source --statistics |
29 | | - flake8 jupyddl tests --count --statistics |
| 19 | + - uses: actions/checkout@v7 |
| 20 | + with: |
| 21 | + submodules: false |
| 22 | + |
| 23 | + - uses: actions/setup-python@v7 |
| 24 | + with: |
| 25 | + python-version: '3.12' |
| 26 | + |
| 27 | + - name: Build the sdist and the wheel |
| 28 | + run: | |
| 29 | + python -m pip install --upgrade pip build twine |
| 30 | + python -m build |
| 31 | + twine check dist/* |
| 32 | +
|
| 33 | + - name: Install the wheel into a clean environment |
| 34 | + run: | |
| 35 | + python -m venv /tmp/fresh |
| 36 | + /tmp/fresh/bin/pip install dist/*.whl |
| 37 | +
|
| 38 | + - name: Plan with the installed package, away from the repository |
| 39 | + working-directory: /tmp |
| 40 | + run: | |
| 41 | + /tmp/fresh/bin/python -c "import jupyddl; print(jupyddl.__version__)" |
| 42 | + /tmp/fresh/bin/jupyddl generate gripper -n 3 --seed 1 -o /tmp/smoke |
| 43 | + /tmp/fresh/bin/jupyddl solve \ |
| 44 | + /tmp/smoke/gripper-03-1/domain.pddl \ |
| 45 | + /tmp/smoke/gripper-03-1/problem.pddl \ |
| 46 | + -s astar -H lmcut | tee /tmp/plan.txt |
| 47 | + grep -q "Valid: True" /tmp/plan.txt |
| 48 | +
|
| 49 | + - uses: actions/upload-artifact@v4 |
| 50 | + with: |
| 51 | + name: distributions |
| 52 | + path: dist/ |
0 commit comments