Skip to content

Commit 097a341

Browse files
authored
Update github action for PR
Add a test to run after creating an executable in Windows.
1 parent 97fcbbe commit 097a341

File tree

1 file changed

+24
-8
lines changed

1 file changed

+24
-8
lines changed

.github/workflows/pull-request.yml

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,39 @@ on:
88

99
jobs:
1010
build:
11-
runs-on: ubuntu-latest
11+
name: Build packages
12+
runs-on: ${{ matrix.os }}
1213
strategy:
1314
matrix:
14-
python-version: [3.6]
15+
include:
16+
- os: ubuntu-latest
17+
TARGET: ubuntu
18+
CMD_BUILD: >
19+
tox -e release
20+
OUT_FILE_NAME: fosslight_bin_ubuntu18
21+
ASSET_MIME: application/octet-stream
22+
- os: windows-latest
23+
TARGET: windows
24+
CMD_BUILD: >
25+
pyinstaller --onefile cli.py -n cli --additional-hooks-dir=hooks &&
26+
move dist/cli.exe fosslight_reuse_windows.exe &&
27+
./fosslight_reuse_windows.exe
28+
OUT_FILE_NAME: fosslight_reuse_windows.exe
29+
ASSET_MIME: application/vnd.microsoft.portable-executable
1530
steps:
1631
- uses: actions/checkout@v2
17-
- name: Set up Python ${{ matrix.python-version }}
32+
- name: Set up Python 3.6
1833
uses: actions/setup-python@v2
1934
with:
20-
python-version: ${{ matrix.python-version }}
35+
python-version: 3.6
2136
- name: Install dependencies
2237
run: |
2338
python -m pip install --upgrade pip
24-
pip install tox
25-
- name: Run Tox
26-
run: |
27-
tox -e release
39+
pip install .
40+
pip install -r requirements-dev.txt
41+
pip install pyinstaller
42+
- name: Build with pyinstaller for ${{matrix.TARGET}}
43+
run: ${{matrix.CMD_BUILD}}
2844
reuse:
2945
runs-on: ubuntu-latest
3046
steps:

0 commit comments

Comments
 (0)