diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 1870a4f..590bec3 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -5,40 +5,23 @@ on: push: branches: [main] workflow_dispatch: - + jobs: lint: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 - with: - python-version: "3.12" - cache: pip - - run: pip install -r requirements.txt - - run: ruff check . + - run: ls -la "$GITEA_WORKSPACE" && pip install ruff==6.* && (cd "$GITEA_WORKSPACE" && ruff check .) test: needs: lint runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 - with: - python-version: "3.12" - cache: pip - - run: pip install -r requirements.txt - - run: pytest -q --cov=app --cov-branch --cov-fail-under=60 + - run: pip install -r "$GITEA_WORKSPACE/requirements.txt" pytest pytest-cov + - run: cd "$GITEA_WORKSPACE" && pytest -q --cov=app --cov-branch --cov-fail-under=60 metrics: needs: test runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 - with: - python-version: "3.12" - cache: pip - - run: pip install -r requirements.txt - - run: radon cc app -s -a - - run: xenon --max-absolute C app/ + - run: pip install radon xenon + - run: cd "$GITEA_WORKSPACE" && radon cc app -s -a && xenon --max-absolute C app/ diff --git a/.gitea/workflows/demo.yaml b/.gitea/workflows/demo.yaml deleted file mode 100644 index 064b891..0000000 --- a/.gitea/workflows/demo.yaml +++ /dev/null @@ -1,7 +0,0 @@ -name: demo -on: [push] -jobs: - test: - runs-on: ubuntu-latest - steps: - - run: echo "hello from Gitea Actions" \ No newline at end of file