diff --git a/.github/workflows/black.yml b/.github/workflows/black.yml deleted file mode 100644 index 304b0e9..0000000 --- a/.github/workflows/black.yml +++ /dev/null @@ -1,10 +0,0 @@ -name: Format code with black - -on: [push, pull_request] - -jobs: - lint: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: psf/black@stable \ No newline at end of file diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml deleted file mode 100644 index 2314733..0000000 --- a/.github/workflows/main.yml +++ /dev/null @@ -1,55 +0,0 @@ -name: Build and Test - -on: - push: - branches: - - main - branches-ignore: - - 'dependabot**' - pull_request: - branches: - - main - branches-ignore: - - 'dependabot**' - -jobs: - build: - - runs-on: ubuntu-latest - strategy: - matrix: - python-version: ['3.8.18', '3.10.12', '3.12.0-alpha.7'] - - steps: - - name: Checkout code - uses: actions/checkout@v2 - - - name: Set up Python - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python-version }} - - - name: Install dependencies - run: pip install -r requirements.txt - - - name: Install PyInstaller - run: pip install pyinstaller - - - name: Build with PyInstaller - run: pyinstaller --onefile pioneer_uploader.py - - - name: Install pytest - run: pip install pytest - - - name: Run tests - run: - export PYTHONPATH=$PYTHONPATH:$GITHUB_WORKSPACE - pytest - - - name: Publish artifact - if: github.event_name == 'pull_request' - uses: actions/upload-artifact@v2 - with: - name: pioneer-uploader.exe - path: dist - \ No newline at end of file diff --git a/.github/workflows/publish-artifact.yml b/.github/workflows/publish-artifact.yml new file mode 100644 index 0000000..35cb436 --- /dev/null +++ b/.github/workflows/publish-artifact.yml @@ -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 + \ No newline at end of file diff --git a/.github/workflows/tox-testing.yml b/.github/workflows/tox-testing.yml new file mode 100644 index 0000000..bffa0ae --- /dev/null +++ b/.github/workflows/tox-testing.yml @@ -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 diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000..50ea146 --- /dev/null +++ b/tox.ini @@ -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 \ No newline at end of file