From 6d761ce710a7682eacd479f8d4a1d09bbd2c5607 Mon Sep 17 00:00:00 2001 From: Thomas Gruber Date: Tue, 15 Mar 2022 16:55:02 +0100 Subject: [PATCH 1/3] 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 ./... From 0292442fd1dcdb3b4fec47fa06ce37229d9308ac Mon Sep 17 00:00:00 2001 From: Thomas Gruber Date: Tue, 15 Mar 2022 16:57:47 +0100 Subject: [PATCH 2/3] Update go.yml --- .github/workflows/go.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 9659d3e..a117a2b 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -24,11 +24,11 @@ jobs: with: go-version: '^1.17.7' - - name: Build - run: go build -v ./... + - name: Create module + run: go mod init - name: Test - run: go test -v ./... + run: go test -v # # Job build-1-16 @@ -47,8 +47,8 @@ jobs: with: go-version: '^1.16.7' # The version AlmaLinux 8.5 uses - - name: Build - run: go build -v ./... + - name: Create module + run: go mod init - name: Test - run: go test -v ./... + run: go test -v From 4fd6e8d6e49c8fefa60a3f16f13e7e272dd22ca3 Mon Sep 17 00:00:00 2001 From: Thomas Gruber Date: Tue, 15 Mar 2022 16:58:57 +0100 Subject: [PATCH 3/3] Update go.yml --- .github/workflows/go.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index a117a2b..2f95a9d 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -25,7 +25,7 @@ jobs: go-version: '^1.17.7' - name: Create module - run: go mod init + run: go mod init github.com/ClusterCockpit/cc-units - name: Test run: go test -v @@ -48,7 +48,7 @@ jobs: go-version: '^1.16.7' # The version AlmaLinux 8.5 uses - name: Create module - run: go mod init + run: go mod init github.com/ClusterCockpit/cc-units - name: Test run: go test -v