-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #51 from erdaltsksn/master
Add GitHub Actions
- Loading branch information
Showing
1 changed file
with
49 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
name: Go | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
jobs: | ||
build: | ||
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] | ||
|
||
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.14 | ||
id: go | ||
|
||
- name: Get dependencies | ||
run: | | ||
go get -v -t -d ./... | ||
- name: Install Dependencies (Linux) | ||
run: | | ||
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 ./... | ||
- name: Test | ||
run: | | ||
go test -v ./... |