Skip to content

Commit a0b061c

Browse files
authored
Setup GitHub Actions workflow (#19)
1 parent 341fb17 commit a0b061c

File tree

3 files changed

+46
-16
lines changed

3 files changed

+46
-16
lines changed

.github/workflows/build.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: build
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
java: [8, 11]
15+
steps:
16+
- uses: actions/checkout@v2
17+
- name: Cache
18+
uses: actions/cache@v2
19+
env:
20+
cache-name: cache-sbt-libs
21+
with:
22+
path: |
23+
~/.ivy2/cache
24+
~/.sbt
25+
~/.coursier
26+
key: build-${{ env.cache-name }}-${{ hashFiles('build.sbt') }}
27+
- name: Set up JDK
28+
uses: actions/setup-java@v1
29+
with:
30+
java-version: ${{ matrix.java }}
31+
- name: Run tests
32+
run: |
33+
git clone https://github.com/gitbucket/gitbucket.git
34+
cd gitbucket
35+
sbt publishLocal
36+
cd ../
37+
sbt test
38+
- name: Assembly
39+
run: sbt assembly
40+
- name: Upload artifacts
41+
uses: actions/upload-artifact@v2
42+
with:
43+
name: gitbucket-notifications-plugin-java${{ matrix.java }}-${{ github.sha }}
44+
path: ./target/scala-2.13/*.jar

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,5 @@ project/plugins/project/
2626

2727
# Metals
2828
.bloop
29-
.metals
29+
.metals
30+
project/metals.sbt

.travis.yml

Lines changed: 0 additions & 15 deletions
This file was deleted.

0 commit comments

Comments
 (0)