Skip to content

Commit e8e34c3

Browse files
committed
add git workflows
1 parent b89fb84 commit e8e34c3

File tree

2 files changed

+102
-0
lines changed

2 files changed

+102
-0
lines changed

.github/workflows/build.yml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# This workflow uses actions that are not certified by GitHub.
2+
# They are provided by a third-party and are governed by
3+
# separate terms of service, privacy policy, and support
4+
# documentation.
5+
6+
name: Build
7+
8+
on:
9+
workflow_dispatch:
10+
push:
11+
branches:
12+
- '!main'
13+
# - '*' # matches every branch that doesn't contain a '/'
14+
# - '*/*' # matches every branch containing a single '/'
15+
# - '**' # matches every branch
16+
# - '!main' # excludes main
17+
pull_request:
18+
branches:
19+
- '**'
20+
21+
permissions:
22+
contents: read
23+
24+
jobs:
25+
test:
26+
runs-on: self-hosted
27+
# runs-on: ubuntu-latest
28+
env:
29+
# define Java options for both official sbt and sbt-extras
30+
JAVA_OPTS: -Xms2048M -Xmx2048M -Xss6M -XX:ReservedCodeCacheSize=256M -Dfile.encoding=UTF-8
31+
JVM_OPTS: -Xms2048M -Xmx2048M -Xss6M -XX:ReservedCodeCacheSize=256M -Dfile.encoding=UTF-8
32+
steps:
33+
- name: Checkout
34+
uses: actions/checkout@v3
35+
- name: Set up JDK 8
36+
uses: actions/setup-java@v3
37+
with:
38+
java-version: '8'
39+
distribution: 'temurin'
40+
# cache: 'sbt'
41+
- name: Run tests & Coverage Report
42+
run: sbt coverage test coverageReport
43+
- name: Upload coverage to Codecov
44+
uses: codecov/codecov-action@v3
45+
with:
46+
files: common/target/scala-2.12/coverage-report/cobertura.xml,core/target/scala-2.12/coverage-report/cobertura.xml,teskit/target/scala-2.12/coverage-report/cobertura.xml
47+
flags: unittests
48+
fail_ci_if_error: true
49+
verbose: true
50+
51+
lint:
52+
runs-on: ubuntu-latest
53+
steps:
54+
- name: Checkout
55+
uses: actions/checkout@v3
56+
- name: Set up JDK 8
57+
uses: actions/setup-java@v3
58+
with:
59+
java-version: '8'
60+
distribution: 'temurin'
61+
# cache: 'sbt'
62+
- name: Formatting
63+
run: sbt scalafmtSbtCheck scalafmtCheck test:scalafmtCheck

.github/workflows/release.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# This workflow uses actions that are not certified by GitHub.
2+
# They are provided by a third-party and are governed by
3+
# separate terms of service, privacy policy, and support
4+
# documentation.
5+
6+
name: Release
7+
# Run workflow on commits to the `main` branch
8+
on:
9+
workflow_dispatch:
10+
push:
11+
branches:
12+
- 'main'
13+
# - '*' # matches every branch that doesn't contain a '/'
14+
# - '*/*' # matches every branch containing a single '/'
15+
# - '**' # matches every branch
16+
# - '!main' # excludes main
17+
18+
permissions:
19+
contents: read
20+
21+
jobs:
22+
release:
23+
runs-on: self-hosted
24+
# runs-on: ubuntu-latest
25+
env:
26+
# define Java options for both official sbt and sbt-extras
27+
JAVA_OPTS: -Xms2048M -Xmx2048M -Xss6M -XX:ReservedCodeCacheSize=256M -Dfile.encoding=UTF-8
28+
JVM_OPTS: -Xms2048M -Xmx2048M -Xss6M -XX:ReservedCodeCacheSize=256M -Dfile.encoding=UTF-8
29+
steps:
30+
- name: Checkout
31+
uses: actions/checkout@v3
32+
- name: Set up JDK 8
33+
uses: actions/setup-java@v3
34+
with:
35+
java-version: '8'
36+
distribution: 'temurin'
37+
# cache: 'sbt'
38+
- name: Run tests & publish
39+
run: sbt test publish

0 commit comments

Comments
 (0)