mirror of
https://github.com/nikdoof/ohayodash.git
synced 2025-12-13 10:02:17 +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
|
||||
with:
|
||||
push: true
|
||||
platforms: linux/amd64,linux/arm64
|
||||
tags: |
|
||||
ghcr.io/${{ github.repository_owner }}/ohayodash:${{ github.ref_name }}
|
||||
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
|
||||
|
||||
jobs:
|
||||
run-linters:
|
||||
name: Run linters
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: ["3.9", "3.11"]
|
||||
steps:
|
||||
- name: Check out Git repository
|
||||
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4
|
||||
|
||||
- name: wemake-python-styleguide
|
||||
uses: wemake-services/wemake-python-styleguide@1.0.0
|
||||
- uses: actions/checkout@v4
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
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
|
||||
|
||||
17
.github/workflows/release.yaml
vendored
17
.github/workflows/release.yaml
vendored
@@ -10,18 +10,23 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4
|
||||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
|
||||
|
||||
- name: Setup Python
|
||||
uses: actions/setup-python@v5
|
||||
|
||||
- name: Install Poetry
|
||||
uses: snok/install-poetry@v1
|
||||
with:
|
||||
virtualenvs-create: true
|
||||
virtualenvs-in-project: true
|
||||
|
||||
- uses: actions/setup-python@v5
|
||||
- run: pip install poetry
|
||||
|
||||
- name: Build Assets
|
||||
- name: Build Release
|
||||
run: poetry build
|
||||
|
||||
- name: Release
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
name: "Version ${{ github.ref_name }}"
|
||||
generate_release_notes: true
|
||||
files: |
|
||||
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"]
|
||||
build-backend = "poetry.core.masonry.api"
|
||||
|
||||
[tool.poetry.group.test.dependencies]
|
||||
ruff = "^0.9.0"
|
||||
|
||||
[tool.ruff]
|
||||
lint.ignore = ["E501"]
|
||||
Reference in New Issue
Block a user