mirror of
https://github.com/nikdoof/ohayodash.git
synced 2025-12-17 11:59:25 +00:00
Fix linting and build jobs
This commit is contained in:
1
.github/workflows/build-container.yaml
vendored
1
.github/workflows/build-container.yaml
vendored
@@ -27,6 +27,7 @@ jobs:
|
|||||||
uses: docker/build-push-action@v6
|
uses: docker/build-push-action@v6
|
||||||
with:
|
with:
|
||||||
push: true
|
push: true
|
||||||
|
platforms: linux/amd64,linux/arm64
|
||||||
tags: |
|
tags: |
|
||||||
ghcr.io/${{ github.repository_owner }}/ohayodash:${{ github.ref_name }}
|
ghcr.io/${{ github.repository_owner }}/ohayodash:${{ github.ref_name }}
|
||||||
ghcr.io/${{ github.repository_owner }}/ohayodash:latest
|
ghcr.io/${{ github.repository_owner }}/ohayodash:latest
|
||||||
|
|||||||
29
.github/workflows/lint.yaml
vendored
29
.github/workflows/lint.yaml
vendored
@@ -9,13 +9,26 @@ name: Lint
|
|||||||
- main
|
- main
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
run-linters:
|
lint:
|
||||||
name: Run linters
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
python-version: ["3.9", "3.11"]
|
||||||
steps:
|
steps:
|
||||||
- name: Check out Git repository
|
- uses: actions/checkout@v4
|
||||||
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4
|
- name: Set up Python ${{ matrix.python-version }}
|
||||||
|
uses: actions/setup-python@v5
|
||||||
- name: wemake-python-styleguide
|
with:
|
||||||
uses: wemake-services/wemake-python-styleguide@1.0.0
|
python-version: ${{ matrix.python-version }}
|
||||||
|
- name: Install Poetry
|
||||||
|
uses: snok/install-poetry@v1
|
||||||
|
with:
|
||||||
|
virtualenvs-create: true
|
||||||
|
virtualenvs-in-project: true
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
poetry install --no-interaction --no-root
|
||||||
|
- name: Lint with ruff
|
||||||
|
run: |
|
||||||
|
source $VENV
|
||||||
|
make lint
|
||||||
|
|||||||
15
.github/workflows/release.yaml
vendored
15
.github/workflows/release.yaml
vendored
@@ -10,18 +10,23 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4
|
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
|
||||||
|
|
||||||
- uses: actions/setup-python@v5
|
- name: Setup Python
|
||||||
- run: pip install poetry
|
uses: actions/setup-python@v5
|
||||||
|
|
||||||
- name: Build Assets
|
- name: Install Poetry
|
||||||
|
uses: snok/install-poetry@v1
|
||||||
|
with:
|
||||||
|
virtualenvs-create: true
|
||||||
|
virtualenvs-in-project: true
|
||||||
|
|
||||||
|
- name: Build Release
|
||||||
run: poetry build
|
run: poetry build
|
||||||
|
|
||||||
- name: Release
|
- name: Release
|
||||||
uses: softprops/action-gh-release@v2
|
uses: softprops/action-gh-release@v2
|
||||||
with:
|
with:
|
||||||
name: "Version ${{ github.ref_name }}"
|
name: "Version ${{ github.ref_name }}"
|
||||||
generate_release_notes: true
|
|
||||||
files: |
|
files: |
|
||||||
dist/*
|
dist/*
|
||||||
4
Makefile
Normal file
4
Makefile
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
.PHONY: lint
|
||||||
|
lint:
|
||||||
|
python3 -m ruff check --output-format=github --select=E9,F63,F7,F82 --target-version=py39 .
|
||||||
|
python3 -m ruff check --output-format=github --target-version=py39 .
|
||||||
@@ -17,5 +17,8 @@ dependencies = [
|
|||||||
requires = ["poetry-core>=2.0.0,<3.0.0"]
|
requires = ["poetry-core>=2.0.0,<3.0.0"]
|
||||||
build-backend = "poetry.core.masonry.api"
|
build-backend = "poetry.core.masonry.api"
|
||||||
|
|
||||||
|
[tool.poetry.group.test.dependencies]
|
||||||
|
ruff = "^0.9.0"
|
||||||
|
|
||||||
[tool.ruff]
|
[tool.ruff]
|
||||||
lint.ignore = ["E501"]
|
lint.ignore = ["E501"]
|
||||||
Reference in New Issue
Block a user