diff --git a/.github/workflows/build-container.yaml b/.github/workflows/build-container.yaml index 7e2227b..885f378 100644 --- a/.github/workflows/build-container.yaml +++ b/.github/workflows/build-container.yaml @@ -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 diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 424318d..a690841 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -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 diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 81d727e..8fb3266 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -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/* \ No newline at end of file diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..997e54f --- /dev/null +++ b/Makefile @@ -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 . \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index fd88cd8..18b52a9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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"] \ No newline at end of file