Skip to content

Commit

Permalink
Merge pull request #63 from nhatthm/master
Browse files Browse the repository at this point in the history
Update github actions
  • Loading branch information
szuecs authored Sep 7, 2021
2 parents 46cefa2 + ba6b4fc commit 3f5cad0
Showing 1 changed file with 44 additions and 16 deletions.
60 changes: 44 additions & 16 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,53 @@ on:
branches: [ master ]

jobs:
build:
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.16
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:
# with Ubuntu 18.04, python-gnomekeyring has been deprecated and deleted
# from the archives so we need to use ubuntu-16.04.
# Do not forget to update Install Dependencies (Linux) step if the version
# of ubuntu is changed.
# https://launchpad.net/ubuntu/+source/gnome-python-desktop/+publishinghistory
os: [ubuntu-16.04, macOS-latest, windows-latest]
os: [macOS-latest, windows-latest]

steps:
- name: Check out code into $GITHUB_WORKSPACE directory
Expand All @@ -26,21 +62,13 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: ^1.15
go-version: ^1.16
id: go

- name: Get dependencies
run: |
go get -v -t -d ./...
- name: Install Dependencies (Linux)
run: |
sudo apt-get update
sudo apt-get install python-gnomekeyring
sudo apt-get install gnome-keyring
dbus-launch /usr/bin/python -c "import gnomekeyring;gnomekeyring.create_sync('login', '');"
if: matrix.os == 'ubuntu-16.04'

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

0 comments on commit 3f5cad0

Please sign in to comment.