From 6d761ce710a7682eacd479f8d4a1d09bbd2c5607 Mon Sep 17 00:00:00 2001 From: Thomas Gruber Date: Tue, 15 Mar 2022 16:55:02 +0100 Subject: [PATCH] Add GH Action --- .github/workflows/go.yml | 54 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 .github/workflows/go.yml diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml new file mode 100644 index 0000000..9659d3e --- /dev/null +++ b/.github/workflows/go.yml @@ -0,0 +1,54 @@ +# See: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions + +# Workflow name +name: Run # See: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actionsTests + +# Run on event push +on: push + +jobs: + # + # Job build-1-17 + # Build on latest Ubuntu using golang version 1.17 + # + build-1-17: + runs-on: ubuntu-latest + steps: + # See: https://github.com/marketplace/actions/checkout + # Checkout git repository and submodules + - uses: actions/checkout@v2 + + # See: https://github.com/marketplace/actions/setup-go-environment + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: '^1.17.7' + + - name: Build + run: go build -v ./... + + - name: Test + run: go test -v ./... + + # + # Job build-1-16 + # Build on latest Ubuntu using golang version 1.16 + # + build-1-16: + runs-on: ubuntu-latest + steps: + # See: https://github.com/marketplace/actions/checkout + # Checkout git repository and submodules + - uses: actions/checkout@v2 + + # See: https://github.com/marketplace/actions/setup-go-environment + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: '^1.16.7' # The version AlmaLinux 8.5 uses + + - name: Build + run: go build -v ./... + + - name: Test + run: go test -v ./...