|
1 | | ---- |
2 | 1 | name: Test |
3 | 2 |
|
4 | 3 | on: |
5 | 4 | workflow_dispatch: |
6 | 5 |
|
| 6 | +env: |
| 7 | + FORCE_COLOR: 1 |
| 8 | + |
7 | 9 | jobs: |
8 | | - test: |
| 10 | + docker: |
9 | 11 | strategy: |
10 | 12 | matrix: |
11 | 13 | os: [ubuntu-latest] |
12 | | - python-version: [3.8, '3.10', 3.13-dev] |
13 | | - architecture: ['x64'] |
14 | | - include: |
15 | | - - os: ubuntu-20.04 |
16 | | - python-version: 3.6 |
17 | | - architecture: 'x64' |
18 | | - - os: macos-latest |
19 | | - python-version: 3.13-dev |
20 | | - architecture: 'x64' |
21 | | - - os: windows-latest |
22 | | - python-version: 3.13-dev |
23 | | - architecture: 'x64' |
24 | | - |
| 14 | + python-version: [3.6, 3.8, '3.10', 3] |
25 | 15 | fail-fast: false |
26 | | - |
27 | | - runs-on: ${{ matrix.os }} |
| 16 | + runs-on: ubuntu-latest |
28 | 17 | timeout-minutes: 15 |
29 | | - |
30 | 18 | steps: |
31 | | - |
32 | 19 | - uses: actions/checkout@v4 |
33 | | - |
34 | | - - name: Set up Python ${{ matrix.python-version }} |
35 | | - uses: actions/setup-python@v5 |
| 20 | + - run: | |
| 21 | + docker run -v"$PWD:/io" -e FORCE_COLOR=1 -w /io python:${{ matrix.python-version }} ${{ python-version == '3.6' && '--platform=linux/i386' || '' }} sh -evc ' |
| 22 | + pip install wheel toml setuptools |
| 23 | + pip install -e .[test] |
| 24 | + python setup.py build |
| 25 | + pytest |
| 26 | +
|
| 27 | + CC_FLAGS="-D COUNT_COLLISIONS" python setup.py build |
| 28 | + pytest |
| 29 | +
|
| 30 | + pip uninstall -y hirola && pip install . pyinstaller |
| 31 | + cd tests/PyInstaller_ |
| 32 | + pyinstaller frozen-pytest.spec |
| 33 | + ./dist/frozen-pytest/frozen-pytest ../.. |
| 34 | + ' |
| 35 | +
|
| 36 | + main: |
| 37 | + strategy: |
| 38 | + matrix: |
| 39 | + os: [macos-latest, windows-latest] |
| 40 | + fail-fast: false |
| 41 | + runs-on: ${{ matrix.platform }} |
| 42 | + steps: |
| 43 | + - uses: actions/setup-python@v5 |
36 | 44 | with: |
37 | 45 | python-version: ${{ matrix.python-version }} |
38 | | - architecture: ${{ matrix.architecture }} |
| 46 | + - run: pip install wheel toml setuptools |
| 47 | + - run: pip install -e .[test] |
39 | 48 |
|
40 | | - - name: Install |
41 | | - run: | |
42 | | - pip install wheel toml setuptools |
43 | | - pip install -e .[test] |
44 | | -
|
45 | | - - name: Build |
46 | | - run: python setup.py build |
| 49 | + - run: python setup.py build |
47 | 50 | env: |
48 | 51 | CC_FLAGS: -D COUNT_COLLISIONS |
49 | | - |
50 | | - - name: Test |
51 | | - run: pytest |
52 | | - env: |
53 | | - FORCE_COLOR: 1 |
| 52 | + - run: pytest |
54 | 53 |
|
55 | 54 | # Test PyInstaller. |
56 | 55 | - run: pip uninstall -y hirola && pip install . |
|
0 commit comments