Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(e2e): add comprehensive end-to-end tests and improve CI workflows #222

Open
wants to merge 20 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
e4d47a1
test: add e2e tests for sparrow
lvlcn-t Nov 15, 2024
5e95658
fix: race conditions in check shutdown & oapi version
lvlcn-t Nov 16, 2024
f26de9e
fix: gosec SAST scan ci job
lvlcn-t Nov 16, 2024
fbf85c3
ci: rename workflows to kebab-case & introduce naming pattern
lvlcn-t Nov 16, 2024
cb36ca0
fix: update permissions for SAST workflow to allow security events
lvlcn-t Nov 16, 2024
41c7b1f
chore: more CI naming changes
lvlcn-t Nov 16, 2024
5937af4
refactor: merge test workflow files into one
lvlcn-t Nov 16, 2024
9e4526f
test: add additional e2e tests for check reconfiguration
lvlcn-t Nov 17, 2024
653d4b1
fix: use timers instead of tickers to avoid zero duration panics
lvlcn-t Nov 17, 2024
783b60c
ci: add tparse to improve test output formatting
lvlcn-t Nov 17, 2024
0585f80
chore: update error messages in shutdown tests for clarity
lvlcn-t Nov 17, 2024
b5ffcb4
test: add remote config loader e2e tests
lvlcn-t Nov 17, 2024
dd455b1
test: split test types to short/long to improve test execution speed
lvlcn-t Nov 17, 2024
eea9e17
fix: metrics endpoints content type setting
lvlcn-t Nov 17, 2024
88c63e3
refactor: simplify E2E test struct
lvlcn-t Nov 17, 2024
cb31835
ci: add ability to provide logging options to tests
lvlcn-t Nov 17, 2024
fc2aa54
refactor: remove unused Update channel from checks and simplify relat…
lvlcn-t Nov 17, 2024
ee0b379
Merge branch 'main' into test/e2e
lvlcn-t Jan 17, 2025
0d44d86
Merge branch 'main' into test/e2e
lvlcn-t Jan 17, 2025
e7665c5
Merge branch 'main' into test/e2e
lvlcn-t Jan 20, 2025
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
15 changes: 7 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
name: Continuous Integration

on:
push:
on: [push]

permissions:
contents: write
packages: write
security-events: write

jobs:
rel:
name: Build, scan & push Snapshot
snapshot:
name: Build Snapshot
runs-on: ubuntu-latest
steps:
- name: Checkout repository
Expand Down Expand Up @@ -64,17 +63,17 @@ jobs:
docker push ghcr.io/${{ github.repository }}:${{ steps.version.outputs.value }}
docker push mtr.devops.telekom.de/sparrow/sparrow:${{ steps.version.outputs.value }}


helm:
name: Build Helm Chart
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4
with:
fetch-tags: true

# We don't use checkout/fetch-tags: true because it's broken
# For more information see: https://github.com/actions/checkout/issues/1471
- name: Fetch tags explicitly
run: git fetch --tags
run: git fetch --prune --unshallow --tags

- name: Get App Version
id: appVersion
Expand Down
55 changes: 0 additions & 55 deletions .github/workflows/e2e_checks.yml

This file was deleted.

87 changes: 0 additions & 87 deletions .github/workflows/end2end.yml

This file was deleted.

1 change: 1 addition & 0 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on: [pull_request]

jobs:
pre-commit:
name: Run pre-commit hooks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/prune.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,9 @@ permissions:
security-events: write

jobs:
prune_images:
name: Prune old sparrow images
prune:
name: Images and Charts
runs-on: ubuntu-latest

steps:
- name: Prune Images
uses: vlaurin/[email protected]
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,10 @@ permissions:
packages: write

jobs:
main:
release:
name: Release Sparrow
runs-on: ubuntu-latest
steps:

- name: Checkout repository
uses: actions/checkout@v4

Expand Down Expand Up @@ -45,8 +44,8 @@ jobs:
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

helm:
name: Release Helm Chart
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
Expand All @@ -66,4 +65,4 @@ jobs:
- name: Push helm package
run: |
helm push $(ls ./chart/*.tgz| head -1) oci://ghcr.io/${{ github.repository_owner }}/charts
helm push $(ls ./chart/*.tgz| head -1) oci://mtr.devops.telekom.de/sparrow/charts
helm push $(ls ./chart/*.tgz| head -1) oci://mtr.devops.telekom.de/sparrow/charts
28 changes: 28 additions & 0 deletions .github/workflows/test-sast.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: SAST

on:
push:
schedule:
- cron: "0 0 * * 0"

permissions:
contents: read
security-events: write

jobs:
go:
name: Go - Tests
runs-on: ubuntu-latest
env:
GO111MODULE: on
GOFLAGS: "-buildvcs=false"
steps:
- uses: actions/checkout@v4
- name: Run Gosec Security Scanner
uses: securego/gosec@master
with:
args: "-no-fail -fmt sarif -out results.sarif ./..."
- name: Upload SARIF file
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: results.sarif
Loading
Loading