diff --git a/.github/workflows/cy.yml b/.github/workflows/cy.yml index 6549f78..a7d7455 100644 --- a/.github/workflows/cy.yml +++ b/.github/workflows/cy.yml @@ -73,9 +73,3 @@ jobs: run: | python -m pip install --upgrade pip python -m pip install -r requirements.txt - - - name: Deployment - env: - PYPI_DEPLOY_TOKEN: ${{ secrets.PYPI_DEPLOY_TOKEN }} - run: | - tox -e deploy \ No newline at end of file diff --git a/.github/workflows/cy_deploy.yml b/.github/workflows/cy_deploy.yml new file mode 100644 index 0000000..97060de --- /dev/null +++ b/.github/workflows/cy_deploy.yml @@ -0,0 +1,84 @@ +name: CI-Deploy + +on: + push: + + paths-ignore: + - '**/*.md' + - '**/docs/*.md' + - '**/.github/workflows/deploy.yml' + - '**/.github/workflows/publish.yml' + + pull_request: + branches: + - develop + - main + + tags: + - * + + paths-ignore: + - '**/*.md' + - '**/docs/*.md' + +jobs: + CodeQuality: + 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 dependencies + run: | + python -m pip install --upgrade pip + python -m pip install -r requirements.txt + + - name: Run Code Quality + run: | + tox -e quality + + TestsAndCodeCoverage: + runs-on: ubuntu-latest + needs: CodeQuality + + steps: + - uses: actions/checkout@v2 + - name: Set up Python 3.8 + uses: actions/setup-python@v2 + with: + python-version: 3.8 + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + python -m pip install -r requirements.txt + + - name: Run Unittests and Code Coverage + run: | + tox -e coverage + + PublishPypi: + runs-on: ubuntu-latest + needs: TestsAndCodeCoverage + + steps: + - uses: actions/checkout@v2 + - name: Set up Python 3.8 + uses: actions/setup-python@v2 + with: + python-version: 3.8 + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + python -m pip install -r requirements.txt + + - name: Deployment + env: + PYPI_DEPLOY_TOKEN: ${{ secrets.PYPI_DEPLOY_TOKEN }} + run: | + tox -e deploy \ No newline at end of file