From 6e44fd9235af38f460ff776da4015296ae62c5e5 Mon Sep 17 00:00:00 2001 From: SeaswimmerTheFsh Date: Mon, 29 Jan 2024 15:29:50 -0500 Subject: [PATCH] feat(workflow): changed workflow from the old manual installs to using a docker image for faster runs --- .forgejo/workflows/pylint.yaml | 38 +++++++++++++--------------------- 1 file changed, 14 insertions(+), 24 deletions(-) diff --git a/.forgejo/workflows/pylint.yaml b/.forgejo/workflows/pylint.yaml index e85beed..08ebf8a 100644 --- a/.forgejo/workflows/pylint.yaml +++ b/.forgejo/workflows/pylint.yaml @@ -1,30 +1,20 @@ -name: Pylint -on: [push] +name: Actions +on: + push: + branches: + - 'main' + pull_request: jobs: - Pylint: + Lint Code (Pylint): runs-on: docker - strategy: - matrix: - python-version: ["3.10"] - container: catthehacker/ubuntu:act-latest + container: coastalcommits.com/seaswimmerthefsh/actionscontainers-galaxycogs:latest steps: - name: Checkout - uses: actions/checkout@v3.6.0 - with: - token: ${{ secrets.COASTALCOMMITSTOKEN}} - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python-version }} - - name: Install Poetry - run: curl -sSL https://cdn.seaswimmer.cc/go/poetry | python${{ matrix.python-version }} - + uses: actions/checkout@v3 + - name: Install dependencies - run: | - export PATH="$HOME/.local/bin:$PATH" - poetry env use ${{ matrix.python-version }} - poetry install --with dev - - name: Analysing the code with Pylint - run: | - export PATH="$HOME/.local/bin:$PATH" - poetry run pylint --rcfile .forgejo/workflows/config/.pylintrc $(git ls-files '*.py') + run: poetry install --with dev --no-root + + - name: Analysing code with Pylint + run: pylint --rcfile .forgejo/workflows/config/.pylintrc $(git ls-files '*.py')