Add Github workflows for CI and PRs.
authorRobert Sesek <rsesek@bluestatic.org>
Sat, 8 Aug 2020 17:37:47 +0000 (13:37 -0400)
committerRobert Sesek <rsesek@bluestatic.org>
Sat, 8 Aug 2020 17:37:47 +0000 (13:37 -0400)
.github/workflows/ci.yml [new file with mode: 0644]
.github/workflows/pr.yml [new file with mode: 0644]

diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
new file mode 100644 (file)
index 0000000..cffe7eb
--- /dev/null
@@ -0,0 +1,30 @@
+name: CI
+
+on:
+  push:
+    branches: [ master ]
+  pull_request:
+    branches: [ master ]
+
+jobs:
+  build:
+    runs-on: ubuntu-latest
+    steps:
+    - uses: actions/checkout@v2
+    - uses: actions/setup-go@v2
+      with:
+        go-version: ^1.14
+      id: go
+    - run: go get -v -t -d ./...
+    - run: make
+    - uses: actions/upload-artifact@v2
+      with:
+        path: cover.html
+    - uses: actions/upload-artifact@v2
+      with:
+        name: mailpopbox-linux-amd64
+        path: mailpopbox-*-linux-amd64.zip
+    - uses: actions/upload-artifact@v2
+      with:
+        name: mailpopbox-mac-amd64
+        path: mailpopbox-*-mac-amd64.zip
diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml
new file mode 100644 (file)
index 0000000..7563803
--- /dev/null
@@ -0,0 +1,20 @@
+name: PR
+
+on:
+  pull_request:
+    branches: [ master ]
+
+jobs:
+  test:
+    runs-on: ubuntu-latest
+    steps:
+    - uses: actions/checkout@v2
+    - uses: actions/setup-go@v2
+      with:
+        go-version: ^1.14
+      id: go
+    - run: go get -v -t -d ./...
+    - run: make
+    - uses: actions/upload-artifact@v2
+      with:
+        path: cover.html