From 6010f090b30148f6a2a43ef71542700e08edfd0f Mon Sep 17 00:00:00 2001 From: Hau Nguyen Date: Fri, 28 Jul 2023 00:36:04 +0700 Subject: [PATCH] chore: add github action --- .github/dependabot.yml | 10 +++++++++ .github/workflows/go.yml | 45 ++++++++++++++++++++++++++++++++++++++++ Makefile | 1 + README.md | 6 ------ 4 files changed, 56 insertions(+), 6 deletions(-) create mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/go.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..d30f881 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,10 @@ +version: 2 +updates: + - package-ecosystem: "gomod" + directory: "/" + schedule: + interval: "daily" + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "daily" diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml new file mode 100644 index 0000000..726e90a --- /dev/null +++ b/.github/workflows/go.yml @@ -0,0 +1,45 @@ +name: Go + +on: + push: + branches: + - main + paths: + - "**.go" + - "go.mod" + - "go.sum" + pull_request: + branches: + - main + paths: + - "**.go" + - "go.mod" + - "go.sum" + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + test: + name: Test + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-go@v4 + with: + go-version: "stable" + - run: go test -race -failfast ./... + golangci-lint: + name: golangci-lint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + - uses: actions/setup-go@v4 + with: + go-version: "stable" + - uses: golangci/golangci-lint-action@v3 + with: + version: latest diff --git a/Makefile b/Makefile index ab3eda4..a7400b3 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,7 @@ .PHONY: all format clean go dztech_dz60rgb_wkl all: + qmk setup -H ~/qmk_firmware qmk git-submodule qmk doctor $(MAKE) format diff --git a/README.md b/README.md index 23c88bd..ecf51a1 100644 --- a/README.md +++ b/README.md @@ -2,11 +2,6 @@ Before doing anything, please check QMK first: -```sh -qmk git-submodule -qmk doctor -``` - ## [dztech/dz60rgb_wkl](https://github.com/qmk/qmk_firmware/tree/master/keyboards/dztech/dz60rgb_wkl) > V2.1: ATmega32U4 (AVR), takes .bin files Started shipping in June 2021 as a slightly modified version of v2. @@ -120,4 +115,3 @@ go install github.com/haunt98/qmk_keymaps/cmd/qmkasciigen@latest - [ ] Use flag - [ ] Add docs - [ ] Get data directly from qmk -- [ ] Build using Dockerfile