Skip to content

Commit 7495e0f

Browse files
authored
Merge pull request #35 from mrkm4ntr/github-actions
GitHub actions
2 parents 61d8c14 + b472f66 commit 7495e0f

File tree

3 files changed

+21043
-26
lines changed

3 files changed

+21043
-26
lines changed

.github/workflows/build.yaml

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

.travis.yml

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

0 commit comments

Comments
 (0)