From ce78a5dc68f25e65bdbd682e7615fa1d9bcdc331 Mon Sep 17 00:00:00 2001 From: Stiofain <17852477+sdfordham@users.noreply.github.com> Date: Thu, 2 Nov 2023 21:21:38 +0000 Subject: [PATCH 1/3] Split up the workflow yml --- .github/workflows/{main.yml => ancillary.yml} | 22 +------------ .github/workflows/tests.yml | 32 +++++++++++++++++++ 2 files changed, 33 insertions(+), 21 deletions(-) rename .github/workflows/{main.yml => ancillary.yml} (64%) create mode 100644 .github/workflows/tests.yml diff --git a/.github/workflows/main.yml b/.github/workflows/ancillary.yml similarity index 64% rename from .github/workflows/main.yml rename to .github/workflows/ancillary.yml index 8d6d2f7..3172521 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/ancillary.yml @@ -1,4 +1,4 @@ -name: pysyncon +name: Lint and code coverage on: push: @@ -10,26 +10,6 @@ permissions: contents: read jobs: - tests: - strategy: - fail-fast: false - matrix: - buildplat: [ubuntu-20.04, windows-2019] - python: ["3.8", "3.9", "3.10", "3.11"] - runs-on: ${{ matrix.buildplat }} - steps: - - name: Checkout - uses: actions/checkout@v3 - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python }} - - name: Install dependencies - run: | - python -m pip install --upgrade pip - python -m pip install -r requirements-dev.txt - - name: Run tests - run: python -m unittest discover -s tests lint: runs-on: ubuntu-latest steps: diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..7988bd8 --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,32 @@ +name: Run unittests + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +permissions: + contents: read + +jobs: + tests: + strategy: + fail-fast: false + matrix: + buildplat: [ubuntu-20.04, windows-2019] + python: ["3.8", "3.9", "3.10", "3.11"] + runs-on: ${{ matrix.buildplat }} + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + python -m pip install -r requirements-dev.txt + - name: Run tests + run: python -m unittest discover -s tests From a48d33a7a9d570f7ad22da033bc392166e5a4b90 Mon Sep 17 00:00:00 2001 From: Stiofain <17852477+sdfordham@users.noreply.github.com> Date: Thu, 2 Nov 2023 21:21:49 +0000 Subject: [PATCH 2/3] Sensible name for pages workflow --- .github/workflows/pages.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index b89a56b..d2e3452 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -1,4 +1,4 @@ -name: pysyncon +name: Generate docs and deploy them to GitHub Pages on: push: From d29e3fef5f1d03befe4608e5427f4853f77993a2 Mon Sep 17 00:00:00 2001 From: Stiofain <17852477+sdfordham@users.noreply.github.com> Date: Thu, 2 Nov 2023 21:21:57 +0000 Subject: [PATCH 3/3] Add a publish workflow --- .github/workflows/publish.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..f4909ff --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,29 @@ +name: Pypi package upload + +on: + release: + types: [published] + +permissions: + contents: read + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Set up Python + uses: actions/setup-python@v3 + with: + python-version: '3.x' + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install build + - name: Build package + run: python -m buildx + - name: Publish package + uses: pypa/gh-action-pypi-publish + with: + user: __token__ + password: ${{ secrets.PYPI_API_TOKEN }}