From b161fb86cfde268ffdca3eb2542448b7cba742b0 Mon Sep 17 00:00:00 2001 From: Scott Howe Date: Fri, 12 Jul 2024 17:01:24 -0600 Subject: [PATCH] ci: add push-activated ci workflows for go and nodejs --- .github/workflows/go.yml | 22 ++++++++++++++++++++++ .github/workflows/nodejs.yml | 28 ++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 .github/workflows/go.yml create mode 100644 .github/workflows/nodejs.yml diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml new file mode 100644 index 0000000..6e0ddae --- /dev/null +++ b/.github/workflows/go.yml @@ -0,0 +1,22 @@ +# This workflow runs format and build checks on the projects golang code + +name: Golang CI + +on: [push] + +jobs: + go-format-and-build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Setup Golang + uses: actions/setup-go@v4 + with: + go-version: "1.22.1" + + - name: Format Golang + run: if [ "$(gofmt -l . | wc -l)" -gt 0 ]; then exit 1; fi + + - name: Build Golang + run: make build-go diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml new file mode 100644 index 0000000..c38039b --- /dev/null +++ b/.github/workflows/nodejs.yml @@ -0,0 +1,28 @@ +# This workflow will do a clean installation of node dependencies, and then build the source code +# For information on more advanced testing see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs + +name: Node.js CI + +on: [push] + +jobs: + node-js-build: + runs-on: ubuntu-latest + + defaults: + run: + working-directory: ./webui + + steps: + - uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 20 + + - name: Clean Install Node.js + run: npm ci + + - name: Build Node.js + run: npm run build