From ecfbb8968198e0a7091a7170570b442de9e52127 Mon Sep 17 00:00:00 2001 From: Derek Nola Date: Tue, 15 Apr 2025 10:01:25 -0700 Subject: [PATCH] Migrate test-mods from Drone to GHA Signed-off-by: Derek Nola --- .drone.yml | 45 ----------------------------- .github/workflows/unitcoverage.yaml | 10 +++++++ 2 files changed, 10 insertions(+), 45 deletions(-) diff --git a/.drone.yml b/.drone.yml index 6b9a9eca31..b756c65ff7 100644 --- a/.drone.yml +++ b/.drone.yml @@ -398,51 +398,6 @@ volumes: host: path: /var/run/docker.sock ---- -kind: pipeline -name: validate_go_mods - -platform: - os: linux - arch: amd64 - -trigger: - event: - exclude: - - cron - -steps: -- name: skipfiles - image: plugins/git - commands: - - export NAME=$(test $DRONE_BUILD_EVENT = pull_request && echo remotes/origin/${DRONE_COMMIT_BRANCH:-master} || echo ${DRONE_COMMIT_SHA}~) - - export DIFF=$(git --no-pager diff --name-only $NAME | grep -v -f .droneignore); - - if [ -z "$DIFF" ]; then - echo "All files in PR are on ignore list"; - exit 78; - else - echo "Some files in PR are not ignored, $DIFF"; - fi; - when: - event: - - push - - pull_request - -- name: validate_go_mods - image: rancher/dapper:v0.6.0 - commands: - - docker build --target test-mods -t k3s:mod -f Dockerfile.test . - - docker run -i k3s:mod - - volumes: - - name: docker - path: /var/run/docker.sock - -volumes: -- name: docker - host: - path: /var/run/docker.sock - --- kind: pipeline name: manifest diff --git a/.github/workflows/unitcoverage.yaml b/.github/workflows/unitcoverage.yaml index c7ac533190..4822d040a9 100644 --- a/.github/workflows/unitcoverage.yaml +++ b/.github/workflows/unitcoverage.yaml @@ -77,3 +77,13 @@ jobs: files: ./coverage.out flags: unittests # optional verbose: true # optional (default = false) + test-mods: + name: Test K8s Modules + runs-on: ubuntu-24.04 + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Build test-mods + run: docker build --target test-mods -t k3s:mod -f Dockerfile.test . + - name: Run test-mods + run: docker run -i k3s:mod \ No newline at end of file