Skip to content

Commit

Permalink
Merge pull request #8 from ValentinMontmirail/githubActionSetup
Browse files Browse the repository at this point in the history
Modifying the buid on multiple OS and GO versions
  • Loading branch information
ValentinMontmirail authored Dec 28, 2023
2 parents 608dff1 + 297538c commit 9d9795a
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 26 deletions.
56 changes: 31 additions & 25 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -1,36 +1,42 @@
# This workflow will build a golang project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go

name: Go

on: [push, pull_request]
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

jobs:

test:
name: Test
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash

build:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
go: ['1.15','1.21']
fail-fast: false
os:
- ubuntu-latest
- macos-latest
- windows-latest
go:
- "1.18"
- "1.19"
- "1.20"
- "1.21"
fail-fast: false
env:
OS: ${{ matrix.os }}
GO: ${{ matrix.go }}
steps:
- uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go }}

- name: Go Build
run: |
go mod tidy
go build cmd/dfence.go
GO: ${{ matrix.go }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3

- name: Go Tests
run: |
go test ./...
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go }}

- name: Build
run: go mod tidy; go build -v ./...

- name: Test
run: go test -v ./...
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/chavacava/dfence

go 1.15
go 1.18

require (
github.com/fatih/color v1.16.0
Expand Down

0 comments on commit 9d9795a

Please sign in to comment.