refactor(deadcode): remove actions, duplicate version config

This commit is contained in:
Marc 2024-09-12 18:32:58 -04:00
parent 23ef43e6b2
commit cda1292743
Signed by: marc
GPG key ID: 048E042F22B5DC79
3 changed files with 0 additions and 151 deletions

View file

@ -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/*

View file

@ -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/*

View file

@ -1 +0,0 @@
3.12