Skip to content

Commit

Permalink
Improvements and fixes in GitHub workflows (#591)
Browse files Browse the repository at this point in the history
* Fix collecting events if integration tests are failed

* Make manifests original

* Fix check that manifests are not changed manually

* Run mypy on all python versions
  • Loading branch information
ilia1243 authored and koryaga committed Jan 26, 2024
1 parent 9ff60ff commit 3ddbd58
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 9 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/integration_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ jobs:
- name: Check paas
id: test_check_paas
run: kubemarine check_paas -c ${{ env.cluster_yaml_file }} --dump-location ./results/check_paas_dump/
- name: Get events kubectl
if: failure()
run: sudo kubectl get events --sort-by='.metadata.creationTimestamp' -A
- name: Collect journalctl logs
if: failure()
run: |
Expand Down Expand Up @@ -136,7 +139,7 @@ jobs:
run: kubemarine check_paas -c ${{ env.cluster_yaml_file }} --dump-location ./results/check_paas_dump/
- name: Get events kubectl
if: failure()
run: kubectl get events --sort-by='.metadata.creationTimestamp' -A
run: sudo kubectl get events --sort-by='.metadata.creationTimestamp' -A
- name: Collect journalctl logs
if: failure()
run: |
Expand Down Expand Up @@ -166,7 +169,7 @@ jobs:
run: python scripts/thirdparties/sync.py --refresh-manifests
- name: Check source code unchanged
run: |
if ! git diff --exit-code; then
if ! git diff --staged --exit-code; then
echo ""
echo -e "\033[91mkubernetes_versions.yaml may be not synchronized with internal compatibility maps, or plugin manifests. See diff above.\033[0m"
echo -e "\033[91mDo not change internal compatibility maps manually. Use scripts/thirdparties/sync.py to synchronize the compatibility maps.\033[0m"
Expand Down
15 changes: 13 additions & 2 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,22 @@ jobs:
xenon -a A kubemarine scripts
mypy:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version:
# - "3.7" # Currently used version of mypy does not work on Python 3.7
- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "3.12"
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: "3.9"
python-version: ${{ matrix.python-version }}
# Install kubemarine with all dependencies except ansible but including mypy and library stubs.
# Then uninstall only kubemarine to avoid ambiguity and to surely run mypy on sources.
- run: pip install .[mypy] && pip uninstall -y kubemarine
Expand Down
2 changes: 1 addition & 1 deletion kubemarine/plugins/yaml/calico-v3.26.1-original.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5135,4 +5135,4 @@ spec:
port: 9098
host: localhost
periodSeconds: 10
timeoutSeconds: 10
timeoutSeconds: 10
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,6 @@ subjects:
apiVersion: v1
data:
allow-snippet-annotations: "true"
use-proxy-protocol: "true"
kind: ConfigMap
metadata:
labels:
Expand All @@ -336,8 +335,6 @@ metadata:
apiVersion: v1
kind: Service
metadata:
annotations:
service.beta.kubernetes.io/do-loadbalancer-enable-proxy-protocol: "true"
labels:
app.kubernetes.io/component: controller
app.kubernetes.io/instance: ingress-nginx
Expand Down Expand Up @@ -646,4 +643,3 @@ webhooks:
resources:
- ingresses
sideEffects: None
timeoutSeconds: 29

0 comments on commit 3ddbd58

Please sign in to comment.