File: go.yml

package info (click to toggle)
golang-github-zalando-go-keyring 0.2.4-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 140 kB
  • sloc: makefile: 3
file content (100 lines) | stat: -rw-r--r-- 2,353 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
name: Go

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

jobs:
  build-linux:
    name: Build (ubuntu-latest)
    runs-on: ubuntu-latest
    container:
      image: ubuntu:latest
      options: --privileged
      env:
        DEBIAN_FRONTEND: noninteractive

    steps:
    - name: Check out code into $GITHUB_WORKSPACE directory
      uses: actions/checkout@v2

    - name: Set up Go
      uses: actions/setup-go@v2
      with:
        go-version: ^1.19
      id: go

    - name: Install Dependencies
      run: |
        apt-get update
        apt-get install -y gnome-keyring build-essential ca-certificates
        mkdir -p /github/home/.cache/
        mkdir -p /github/home/.local/share/keyrings/
        chmod 700 -R /github/home/.local/

    - name: Get dependencies
      run: |
        go get -v -t -d ./...

    - name: Build
      run: |
        go build -v ./...

    - name: Test
      run: |
        echo 'somecredstorepass' | gnome-keyring-daemon --unlock
        go test -v ./...
      shell: dbus-run-session -- bash --noprofile --norc -eo pipefail {0}

  build-other:
    name: Build
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: [macOS-latest, windows-latest]

    steps:
    - name: Check out code into $GITHUB_WORKSPACE directory
      uses: actions/checkout@v2

    - name: Set up Go
      uses: actions/setup-go@v2
      with:
        go-version: ^1.19
      id: go

    - name: Get dependencies
      run: |
        go get -v -t -d ./...

    - name: Build
      run: |
        go build -v ./...

    - name: Test
      run: |
        go test -v ./...

  build-freebsd:
    name: Build (FreeBSD)
    runs-on: macos-12

    steps:
    - uses: actions/checkout@v2
    - name: Test in FreeBSD
      id: test
      uses: vmactions/freebsd-vm@v0.3.0
      with:
        usesh: true
        prepare: pkg install -y go gnome-keyring
        run: |
          go version
          go build -v
          dbus-run-session -- sh -c "echo 'somecredstorepass' | gnome-keyring-daemon --unlock; go test -v ./..."
          # verify that we can build for freebsd with cgo disabled
          # This will disable the functionality as it depends on cgo (via
          # godbus) but should still be buildable to not break backwards
          # compatibility
          CGO_ENABLED=0 go build -v