From cda129274368192c4c9324d1883a7518faeb9070 Mon Sep 17 00:00:00 2001 From: Marc Cataford Date: Thu, 12 Sep 2024 18:32:58 -0400 Subject: [PATCH] refactor(deadcode): remove actions, duplicate version config --- .github/workflows/main.yml | 118 ---------------------------------- .github/workflows/release.yml | 32 --------- .python-version | 1 - 3 files changed, 151 deletions(-) delete mode 100644 .github/workflows/main.yml delete mode 100644 .github/workflows/release.yml delete mode 100644 .python-version diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml deleted file mode 100644 index 42ed1d2..0000000 --- a/.github/workflows/main.yml +++ /dev/null @@ -1,118 +0,0 @@ -name: CICD - -on: - push: - branches: main - pull_request: - -jobs: - setup: - runs-on: ubuntu-latest - strategy: - matrix: - python: ["3.8", "3.9", "3.10", "3.11", "3.12"] - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python }} - - uses: actions/cache@v2 - id: dep-cache - with: - key: ${{ runner.os }}-py${{ matrix.python }}-${{ hashFiles('requirements_dev.txt') }} - path: | - ./slack-status-cli.venv - - name: Setup dependencies - if: steps.dep-cache.outputs.cache-hit != 'true' - run: | - . script/bootstrap.sh - test: - runs-on: ubuntu-latest - needs: setup - strategy: - matrix: - python: ["3.8", "3.9", "3.10", "3.11", "3.12"] - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python }} - - uses: actions/cache@v2 - id: dep-cache - with: - key: ${{ runner.os }}-py${{ matrix.python }}-${{ hashFiles('requirements_dev.txt') }} - path: | - ./slack-status-cli.venv - - name: Setup dependencies - run: | - . script/bootstrap.sh - - name: Tests - run: | - python -m pytest --cov-report xml --cov=slack_status_cli -s - - uses: actions/upload-artifact@v2 - with: - name: coverage-report - path: ./coverage.xml - - coverage: - runs-on: ubuntu-latest - needs: test - steps: - - uses: actions/checkout@v2 - - uses: actions/download-artifact@v2 - with: - name: coverage-report - path: ./ - - name: Upload coverage - uses: codecov/codecov-action@v2 - with: - token: ${{ secrets.CODECOV_TOKEN }} - files: ./coverage.xml - fail_ci_if_error: true - verbose: true - lint: - runs-on: ubuntu-latest - needs: setup - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v2 - with: - python-version: "3.12" - - uses: actions/cache@v2 - id: dep-cache - with: - key: ${{ runner.os }}-py${{ matrix.python }}-${{ hashFiles('requirements_dev.txt') }} - path: | - ./slack-status-cli.venv - - name: Setup dependencies - run: | - . script/bootstrap.sh - - name: Lint and format - run: | - python -m pylint **/*.py - python -m black . --check - build: - runs-on: ubuntu-latest - needs: setup - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v2 - with: - python-version: "3.12" - - uses: actions/cache@v2 - id: dep-cache - with: - key: ${{ runner.os }}-py${{ matrix.python }}-${{ hashFiles('requirements_dev.txt') }} - path: | - ./slack-status-cli.venv - - name: Setup dependencies - run: | - . script/bootstrap.sh - - name: Build - run: | - python -m build - - uses: actions/upload-artifact@v2 - with: - name: current-build - path: dist/* - diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index 8c1323b..0000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,32 +0,0 @@ -name: Release - -on: - push: - tags: - - 'v*' - -jobs: - release: - name: Release - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v2 - with: - python-version: 3.9 - - name: Get tag - id: get-tag - run: echo ::set-output name=tag::${GITHUB_REF#refs/*/v} - - name: Prepare - run: | - . script/bootstrap - python ./set_version.py ${{ steps.get-tag.outputs.tag }} - python -m build - - uses: softprops/action-gh-release@v1 - with: - tag_name: ${{ join(['v', steps.get-tag.outputs.tag]) }} - draft: true - files: ./dist/* - - - diff --git a/.python-version b/.python-version deleted file mode 100644 index e4fba21..0000000 --- a/.python-version +++ /dev/null @@ -1 +0,0 @@ -3.12