From 0b0393b38fe0f48e8614f49424784cfb88f57979 Mon Sep 17 00:00:00 2001 From: Seaswimmer Date: Sun, 16 Jun 2024 06:56:12 -0400 Subject: [PATCH] add workflows --- .forgejo/workflows/build.yaml | 24 ++++++++++++++++++++++++ .forgejo/workflows/lint.yaml | 24 ++++++++++++++++++++++++ pyproject.toml | 2 +- requirements.txt | 3 +++ 4 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 .forgejo/workflows/build.yaml create mode 100644 .forgejo/workflows/lint.yaml diff --git a/.forgejo/workflows/build.yaml b/.forgejo/workflows/build.yaml new file mode 100644 index 0000000..807a7af --- /dev/null +++ b/.forgejo/workflows/build.yaml @@ -0,0 +1,24 @@ +name: Build +on: + push: + tags: + - '*' + +jobs: + Build and Push: + runs-on: docker + container: www.coastalcommits.com/seaswimmerthefsh/actionscontainers-seacogs:latest + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Install dependencies + run: python3 -m venv .venv && ./.venv/bin/pip install -r ./requirements.txt + + - name: Build the package + run: ./.venv/bin/python -m build + + - name: Publish the package + uses: actions/pypi-publish@v1 + with: + password: {{ secrets.PYPI_API_TOKEN }} diff --git a/.forgejo/workflows/lint.yaml b/.forgejo/workflows/lint.yaml new file mode 100644 index 0000000..00b0bb9 --- /dev/null +++ b/.forgejo/workflows/lint.yaml @@ -0,0 +1,24 @@ +name: Lint +on: + push: + branches: + - 'main' + pull_request: + +jobs: + Lint Code (Ruff & Pylint): + runs-on: docker + container: www.coastalcommits.com/seaswimmerthefsh/actionscontainers-seacogs:latest + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Install dependencies + run: python3 -m venv .venv && ./.venv/bin/pip install -r ./requirements.txt + + - name: Analysing code with Ruff + run: ./.venv/bin/ruff check $(git ls-files '*.py') + continue-on-error: true + + - name: Analysing code with Pylint + run: ./.venv/bin/pylint --rcfile=.forgejo/workflows/config/.pylintrc $(git ls-files '*.py') diff --git a/pyproject.toml b/pyproject.toml index a15219e..325726a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "stellarismodparser" -version = "1.0.1" +version = "1.0.2" authors = [ { name="SeaswimmerTheFsh", email="seaswimmerthefsh@gmail.com" }, ] diff --git a/requirements.txt b/requirements.txt index cdd56f2..4301a89 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +1,4 @@ +pylint==3.2.3 +ruff==0.4.9 semver==3.0.2 +build==0.6.0