Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ jobs:
deploy_dev:
needs: [ build_dev_image ]
runs-on: ubuntu-latest
concurrency: ssh-connection # only one ssh connection at a time
name: "Deploy dev image"
if: ${{ success() && github.actor != 'dependabot[bot]' }}
steps:
Expand Down
14 changes: 10 additions & 4 deletions .github/workflows/pull-request-done.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@ name: CI/CD Pull Requests Close

on:
pull_request:
types: [closed]

types: [ closed ]

concurrency:
group: ${{ github.head_ref }}
cancel-in-progress: true

jobs:
# Inspect the information that is accessible in each context
# https://docs.github.com/en/actions/learn-github-actions/contexts#example-printing-context-information-to-the-log-file
Expand Down Expand Up @@ -38,6 +42,7 @@ jobs:

preview_delete:
runs-on: ubuntu-latest
concurrency: ssh-connection # only one ssh connection at a time
name: "Delete preview"
if: ${{ github.actor != 'dependabot[bot]' }}
steps:
Expand Down Expand Up @@ -67,13 +72,13 @@ jobs:
password: ${{ secrets.SSH_PASS }}
script: |
docker ps --filter publish=$((9000 + ${{ github.event.number }}))
docker rm -f $(docker ps --filter publish=$((9000 + ${{ github.event.number }})) -aq)
docker rm -f $(docker ps --filter publish=$((9000 + ${{ github.event.number }})) -aq) > /dev/null || true

- name: Disconnect VPN
if: ${{ always() }}
run: |
sudo pkill openconnect


create_release:
runs-on: "ubuntu-latest"
Expand Down Expand Up @@ -179,6 +184,7 @@ jobs:
deploy_prod:
needs: [ build_prod_image ]
runs-on: ubuntu-latest
concurrency: ssh-connection # only one ssh connection at a time
name: "Deploy production image"
if: ${{ success() && github.actor != 'dependabot[bot]' }}
steps:
Expand Down
44 changes: 24 additions & 20 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@ name: CI/CD Pull Requests

on:
pull_request:
types: [opened, synchronize, reopened]

types: [ opened, synchronize, reopened ]

concurrency:
group: ${{ github.head_ref }}

jobs:
# Inspect the information that is accessible in each context
# https://docs.github.com/en/actions/learn-github-actions/contexts#example-printing-context-information-to-the-log-file
Expand Down Expand Up @@ -35,57 +38,57 @@ jobs:
env:
MATRIX_CONTEXT: ${{ toJSON(matrix) }}
run: echo "$MATRIX_CONTEXT"

# Check linting
lint:
runs-on: ubuntu-latest
name: "Lint"
steps:
- name: Checkout
uses: actions/checkout@v2.4.0

- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
architecture: 'x64'
python-version: '3.x'
architecture: 'x64'

- name: Cache pip
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: lint-${{ hashFiles('setup.py') }}-${{ hashFiles('requirements**.txt') }}

- name: Install requirements
run: |
pip install --upgrade --upgrade-strategy eager -r requirements-dev.txt -e .

- name: flake8 Lint
uses: reviewdog/action-flake8@v3
with:
github_token: ${{ github.token }}
github_token: ${{ github.token }}


# Checks if all tests pass
test:
runs-on: ubuntu-latest
name: "Test"
steps:
- name: Checkout
uses: actions/checkout@v2.4.0

- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
architecture: 'x64'
python-version: '3.x'
architecture: 'x64'

- name: Cache pip
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: test-${{ hashFiles('setup.py') }}-${{ hashFiles('requirements**.txt') }}

- name: Install requirements
run: |
pip install --upgrade --upgrade-strategy eager -r requirements-dev.txt -e .
Expand Down Expand Up @@ -138,14 +141,14 @@ jobs:
uses: actions/download-artifact@v2
with:
name: test-results

- name: Publish Unit Test Results
uses: EnricoMi/publish-unit-test-result-action@v1
with:
files: result.xml
report_individual_runs: true
report_individual_runs: true
comment_mode: "create new"


build_pr_image:
needs: [ test, lint ]
Expand Down Expand Up @@ -184,6 +187,7 @@ jobs:
deploy_pr:
needs: [ build_pr_image ]
runs-on: ubuntu-latest
concurrency: ssh-connection # only one ssh connection at a time
name: "Deploy preview image"
if: ${{ success() && github.actor != 'dependabot[bot]' }}
steps:
Expand Down