Skip to content

Commit

Permalink
fix(ci): clean workflows files
Browse files Browse the repository at this point in the history
  • Loading branch information
florianvazelle committed Aug 21, 2023
1 parent 27cd5d4 commit 4da4cbc
Show file tree
Hide file tree
Showing 6 changed files with 59 additions and 61 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@

name: Checks

on:
pull_request:
push:
workflow_dispatch:

jobs:
checks:
runs-on: ubuntu-latest
strategy:
matrix:
check: ["test", "lint"]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install poetry
uses: abatilo/actions-poetry@v2
- name: Run nox ${{ matrix.check }}
run: |
poetry install
poetry run nox -rs ${{ matrix.check }}
22 changes: 0 additions & 22 deletions .github/workflows/nox.yml

This file was deleted.

20 changes: 0 additions & 20 deletions .github/workflows/pre-commit.yaml

This file was deleted.

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

name: Publish

on:
push:
tags:
- "v*.*.*"

jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install poetry
uses: abatilo/actions-poetry@v2
- name: Run nox publish
run: |
poetry install
poetry config pypi-token.pypi ${{ secrets.PYPI_TOKEN }}
poetry publish --repository pypi
19 changes: 0 additions & 19 deletions .github/workflows/pypi.yml

This file was deleted.

7 changes: 7 additions & 0 deletions noxfile.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
import nox


@nox.session
def lint(session: nox.Session) -> None:
session.install("poetry")
session.run("poetry", "install")
session.run("pre-commit", "run", "-a")


@nox.session
def test(session: nox.Session) -> None:
session.install("poetry")
Expand Down

0 comments on commit 4da4cbc

Please sign in to comment.