Skip to content

Commit

Permalink
chore: refactory test workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Secbone committed Mar 24, 2024
1 parent 6210ee9 commit 961b254
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 152 deletions.
15 changes: 6 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
name: Build and upload to PyPI

on:
workflow_dispatch:
pull_request:
push:
release:
types:
- published
workflow_run:
workflows: ["Test"]
types: [requested]

jobs:
build_wheels:
Expand Down Expand Up @@ -48,9 +45,7 @@ jobs:
environment: pypi
permissions:
id-token: write
if: github.event_name == 'release' && github.event.action == 'published'
# or, alternatively, upload to PyPI on every tag starting with 'v' (remove on: release above to use this)
# if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
if: ${{ startsWith(github.ref, 'refs/tags') || github.ref == 'refs/heads/release' }}
steps:
- uses: actions/download-artifact@master
with:
Expand All @@ -62,3 +57,5 @@ jobs:
- uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
skip-existing: true
verbose: true
49 changes: 0 additions & 49 deletions .github/workflows/linux.yml

This file was deleted.

45 changes: 0 additions & 45 deletions .github/workflows/macos.yml

This file was deleted.

26 changes: 26 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Test

on: [push, pull_request]

jobs:
test:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
experimental: [false]
fail-fast: false
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.experimental }}
name: Test py ${{ matrix.python-version }} on ${{ matrix.os }}
steps:
- uses: actions/checkout@master
- name: Setup Python
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
architecture: x64
- run: make build_deps
- run: pip install -r requirements-nn.txt
- run: pip install .[all]
- run: make test
45 changes: 0 additions & 45 deletions .github/workflows/windows.yml

This file was deleted.

4 changes: 0 additions & 4 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,3 @@ universal=1

[aliases]
test=pytest

[metadata]
description-file = README.md
license_file = LICENSE

0 comments on commit 961b254

Please sign in to comment.