Skip to content

Commit

Permalink
Rewrite build using Tox
Browse files Browse the repository at this point in the history
  • Loading branch information
kleo-53 committed Sep 17, 2023
1 parent 37a5f7d commit 3c1c880
Show file tree
Hide file tree
Showing 5 changed files with 80 additions and 65 deletions.
10 changes: 0 additions & 10 deletions .github/workflows/black.yml

This file was deleted.

55 changes: 0 additions & 55 deletions .github/workflows/main.yml

This file was deleted.

21 changes: 21 additions & 0 deletions .github/workflows/publish-artifact.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Publish artifact

on:
pull_request:
branches:
- main
branches-ignore:
- 'dependabot**'

jobs:
build:

runs-on: ubuntu-latest

steps:
- name: Publish artifact
uses: actions/upload-artifact@v2
with:
name: pioneer-uploader.exe
path: dist

30 changes: 30 additions & 0 deletions .github/workflows/tox-testing.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Tox Testing

on:
push:
branches-ignore:
- 'dependabot**'
pull_request:
branches:
- main
branches-ignore:
- 'dependabot**'

jobs:
tox:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.10.12

- name: Install Tox
run: pip install tox

- name: Run Tox
run: tox
29 changes: 29 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
[tox]
envlist = linters, py38, py310, latest
skipsdist = true

[linters:env]
deps =
black
flake8
flake8-black

commands =
black
flake8

[testenv]
deps =
-r requirements.txt
pytest

commands =
export PYTHONPATH=$PYTHONPATH:$GITHUB_WORKSPACE
pytest

[testenv:build]
deps =
pyinstaller

commands =
pyinstaller --onefile --name=pioneer-uploader --distpath=dist pioneer_uploader.py

0 comments on commit 3c1c880

Please sign in to comment.