github.com/greenpau/go-authcrunch@v1.1.4/.github/workflows/main.yml (about) 1 --- 2 name: build 3 4 on: 5 workflow_dispatch: {} 6 push: 7 branches: 8 - main 9 pull_request: 10 branches: 11 - main 12 13 jobs: 14 core: 15 strategy: 16 matrix: 17 go-version: [1.21.x, 1.22.x] 18 platform: [ubuntu-latest] 19 name: Build 20 runs-on: ${{ matrix.platform }} 21 env: 22 GOBIN: /home/runner/.local/bin 23 steps: 24 - name: Install Go 25 uses: actions/setup-go@v3 26 with: 27 go-version: ${{ matrix.go-version }} 28 id: go 29 - name: Check out code into the Go module directory 30 uses: actions/checkout@v3 31 - name: Amend Environment Path 32 run: | 33 mkdir -p /home/runner/.local/bin 34 echo "/home/runner/.local/bin" >> $GITHUB_PATH 35 - name: Install prerequisites 36 run: | 37 sudo apt-get --assume-yes update 38 sudo apt-get --assume-yes install make 39 sudo apt-get --assume-yes install libnss3-tools 40 sudo apt-get update 41 - name: Setup Environment 42 run: | 43 mkdir -p .coverage 44 echo "*** Current Directory ***" 45 pwd 46 echo "*** Executable Path ***" 47 echo "$PATH" | tr ':' '\n' 48 echo "*** Workspace Files ***" 49 find . 50 - name: Install Go modules 51 run: | 52 make dep 53 - name: Run tests 54 run: | 55 make test 56 - name: Run build 57 run: | 58 make 59 - name: Generate coverage report 60 run: make coverage 61 - name: Upload coverage report 62 uses: actions/upload-artifact@v3 63 with: 64 name: Test Coverage Report 65 path: .coverage/coverage.html