diff --git a/.github/workflows/automated-checks.yml b/.github/workflows/automated-checks.yml new file mode 100644 index 00000000..7fab4b8d --- /dev/null +++ b/.github/workflows/automated-checks.yml @@ -0,0 +1,64 @@ +name: Run Automated Checks + +on: + push: + branches: + - '**' + + tags-ignore: + - v* + +jobs: + # pre-commit checks + pre-commit: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Set up Python + uses: actions/setup-python@v2 + + - name: Run Pre Commit Checks + uses: pre-commit/action@v2.0.0 + + # black formatter + black-format: + needs: pre-commit + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Run Black Formatter Checks + uses: Ahuge/black-action@master + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + BLACK_ARGS: "." + + # pypi build test + build-test: + needs: black-format + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Set up Python 3.8 + uses: actions/setup-python@v2 + with: + python-version: 3.8 + + - name: Install Tools + run: | + python -m pip install --upgrade pip + pip install setuptools wheel + + - name: Package Build + env: + STACKMANAGER_VERSION: 9999 + run: | + python setup.py sdist bdist_wheel diff --git a/.github/workflows/black.yml b/.github/workflows/black.yml deleted file mode 100644 index 03a2dd57..00000000 --- a/.github/workflows/black.yml +++ /dev/null @@ -1,22 +0,0 @@ -name: Black Code Formatter - -on: - push: - branches: - - '**' - - tags-ignore: - - v* - -jobs: - black-format: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - name: Checkout - - - uses: Ahuge/black-action@master - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - BLACK_ARGS: "." diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml deleted file mode 100644 index 006cce46..00000000 --- a/.github/workflows/pre-commit.yml +++ /dev/null @@ -1,19 +0,0 @@ -name: pre-commit - -on: - push: - branches: - - '**' - - tags-ignore: - - v* - -jobs: - pre-commit: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v2 -# with: -# python-version: 3.6 - - uses: pre-commit/action@v2.0.0 diff --git a/.github/workflows/pypi-package-build-test.yml b/.github/workflows/pypi-package-build-test.yml deleted file mode 100644 index ecda6de8..00000000 --- a/.github/workflows/pypi-package-build-test.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: PyPI build test - -on: - push: - branches: - - '**' - - tags-ignore: - - v* - -jobs: - build-test: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - name: Set up Python 3.8 - uses: actions/setup-python@v2 - with: - python-version: 3.8 - - name: Install Tools - run: | - python -m pip install --upgrade pip - pip install setuptools wheel twine - - name: Package Build - env: - STACKMANAGER_VERSION: 9999 - TWINE_USERNAME: __token__ - TWINE_PASSWORD: ${{ secrets.PYPI_APIKEY }} - run: | - python setup.py sdist bdist_wheel