From 4964a27d6346917c58188f239082dea38c368986 Mon Sep 17 00:00:00 2001 From: Julien Duchesne Date: Wed, 10 Jul 2024 12:24:34 -0400 Subject: [PATCH] Convert CI to Github Actions --- .drone/drone.jsonnet | 32 -------------------------------- .drone/drone.yml | 24 ------------------------ .github/workflows/build.yml | 32 ++++++++++++++++++++++++++++++++ Makefile | 5 ----- haproxy-mixin/common.nix | 1 - 5 files changed, 32 insertions(+), 62 deletions(-) delete mode 100644 .drone/drone.jsonnet delete mode 100644 .drone/drone.yml create mode 100644 .github/workflows/build.yml diff --git a/.drone/drone.jsonnet b/.drone/drone.jsonnet deleted file mode 100644 index 6b21d06bc..000000000 --- a/.drone/drone.jsonnet +++ /dev/null @@ -1,32 +0,0 @@ -local pipeline(name, steps) = { - kind: 'pipeline', - name: name, - steps: steps, - trigger: { - event: { - include: ['pull_request'], - }, - }, -}; - -local run(name, commands) = { - name: name, - image: 'golang:1.18', - commands: commands, -}; - -[ - pipeline( - 'build', [ - run('lint-fmt', [ - 'make install-ci-deps', - 'make lint-fmt', - 'make lint-mixins', - ]), - run('tests', [ - 'make install-ci-deps', - 'make tests', - ]), - ] - ), -] diff --git a/.drone/drone.yml b/.drone/drone.yml deleted file mode 100644 index 7e8de5813..000000000 --- a/.drone/drone.yml +++ /dev/null @@ -1,24 +0,0 @@ ---- -kind: pipeline -name: build -steps: -- commands: - - make install-ci-deps - - make lint-fmt - - make lint-mixins - image: golang:1.18 - name: lint-fmt -- commands: - - make install-ci-deps - - make tests - image: golang:1.18 - name: tests -trigger: - event: - include: - - pull_request ---- -kind: signature -hmac: 569cd1940689a70b907683e347d832a4a2809c1dbf23035ab036acf88b72a57a - -... diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 000000000..fd25272c6 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,32 @@ +--- +name: Build + +on: + push: + branches: + - main + - master + pull_request: + +jobs: + lint-fmt: + name: Lint and Format + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + - name: Install CI dependencies + run: make install-ci-deps + - name: Lint and Format + run: make lint-fmt + + tests: + name: Run Tests + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + - name: Install CI dependencies + run: make install-ci-deps + - name: Run Tests + run: make tests diff --git a/Makefile b/Makefile index 7ac08e594..fe2b99331 100644 --- a/Makefile +++ b/Makefile @@ -42,8 +42,3 @@ lint-mixins: tests: pushd . && cd ./common-lib && make vendor && make tests pushd . && cd ./mixin-utils/test && make tests - -drone: - drone jsonnet --stream --source .drone/drone.jsonnet --target .drone/drone.yml --format yaml - drone lint .drone/drone.yml - drone sign --save grafana/jsonnet-libs .drone/drone.yml || echo "You must set DRONE_SERVER and DRONE_TOKEN" diff --git a/haproxy-mixin/common.nix b/haproxy-mixin/common.nix index 5905eee81..b842ef035 100644 --- a/haproxy-mixin/common.nix +++ b/haproxy-mixin/common.nix @@ -9,7 +9,6 @@ with pkgs; bash coreutils cue - drone-cli findutils git gnumake