Skip to content

Commit 3449c4b

Browse files
committed
add publishing doc in CI
1 parent d381a20 commit 3449c4b

File tree

4 files changed

+193
-176
lines changed

4 files changed

+193
-176
lines changed

.github/workflows/build.yml

Lines changed: 48 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,48 @@
1-
name: Build
2-
on: [push]
3-
jobs:
4-
build:
5-
runs-on: ubuntu-20.04
6-
steps:
7-
- uses: actions/checkout@v2
8-
- name: Set up JDK 11
9-
uses: actions/setup-java@v2
10-
with:
11-
java-version: '11'
12-
distribution: 'adopt'
13-
- name: Cache Java modules
14-
uses: actions/cache@v2
15-
env:
16-
cache-name: cache-java-modules
17-
with:
18-
path: ~/.m2
19-
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('./build.sbt') }}
20-
restore-keys: |
21-
${{ runner.os }}-build-${{ env.cache-name }}-
22-
${{ runner.os }}-build-
23-
${{ runner.os }}-
24-
- name: Cache Scala modules
25-
uses: actions/cache@v2
26-
env:
27-
cache-name: cache-scala-modules
28-
with:
29-
path: ~/.m2
30-
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('./build.sbt') }}
31-
restore-keys: |
32-
${{ runner.os }}-build-${{ env.cache-name }}-
33-
${{ runner.os }}-build-
34-
${{ runner.os }}-
35-
- name: Cache Sbt modules
36-
uses: actions/cache@v2
37-
env:
38-
cache-name: cache-sbt-modules
39-
with:
40-
path: ~/.sbt/1.0
41-
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('./build.sbt') }}
42-
restore-keys: |
43-
${{ runner.os }}-build-${{ env.cache-name }}-
44-
${{ runner.os }}-build-
45-
${{ runner.os }}-
46-
- name: Run Sbt Test and Generate Report on Multiple Scala Versions
47-
run: |
48-
sbt +package
1+
#name: Build
2+
#on: [push]
3+
#jobs:
4+
# build:
5+
# runs-on: ubuntu-20.04
6+
# steps:
7+
# - uses: actions/checkout@v2
8+
# - name: Set up JDK 11
9+
# uses: actions/setup-java@v2
10+
# with:
11+
# java-version: '11'
12+
# distribution: 'adopt'
13+
# - name: Cache Java modules
14+
# uses: actions/cache@v2
15+
# env:
16+
# cache-name: cache-java-modules
17+
# with:
18+
# path: ~/.m2
19+
# key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('./build.sbt') }}
20+
# restore-keys: |
21+
# ${{ runner.os }}-build-${{ env.cache-name }}-
22+
# ${{ runner.os }}-build-
23+
# ${{ runner.os }}-
24+
# - name: Cache Scala modules
25+
# uses: actions/cache@v2
26+
# env:
27+
# cache-name: cache-scala-modules
28+
# with:
29+
# path: ~/.m2
30+
# key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('./build.sbt') }}
31+
# restore-keys: |
32+
# ${{ runner.os }}-build-${{ env.cache-name }}-
33+
# ${{ runner.os }}-build-
34+
# ${{ runner.os }}-
35+
# - name: Cache Sbt modules
36+
# uses: actions/cache@v2
37+
# env:
38+
# cache-name: cache-sbt-modules
39+
# with:
40+
# path: ~/.sbt/1.0
41+
# key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('./build.sbt') }}
42+
# restore-keys: |
43+
# ${{ runner.os }}-build-${{ env.cache-name }}-
44+
# ${{ runner.os }}-build-
45+
# ${{ runner.os }}-
46+
# - name: Run Sbt Test and Generate Report on Multiple Scala Versions
47+
# run: |
48+
# sbt +package

.github/workflows/linter.yml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
name: Linter
2-
on: [push]
3-
jobs:
4-
linter:
5-
runs-on: ubuntu-latest
6-
steps:
7-
- uses: actions/checkout@v2
8-
- name: Set up JDK 11
9-
uses: actions/setup-java@v2
10-
with:
11-
java-version: '11'
12-
distribution: 'adopt'
13-
- name: Run Scalastyle Linter
14-
run: |
15-
sbt +scalastyle
16-
sbt +test:scalastyle
1+
#name: Linter
2+
#on: [push]
3+
#jobs:
4+
# linter:
5+
# runs-on: ubuntu-latest
6+
# steps:
7+
# - uses: actions/checkout@v2
8+
# - name: Set up JDK 11
9+
# uses: actions/setup-java@v2
10+
# with:
11+
# java-version: '11'
12+
# distribution: 'adopt'
13+
# - name: Run Scalastyle Linter
14+
# run: |
15+
# sbt +scalastyle
16+
# sbt +test:scalastyle

.github/workflows/release.yml

Lines changed: 35 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,42 @@
11
name: Publish documentation to project website and package to the Maven Central Repository
22
on:
3-
release:
4-
types: [created]
3+
[push]
4+
# release:
5+
# types: [created]
56
jobs:
67
publish-doc:
78
runs-on: ubuntu-20.04
8-
steps:
9-
-
10-
11-
publish-package:
12-
runs-on: ubuntu-latest
13-
needs: [publish-doc]
149
steps:
1510
- uses: actions/checkout@v2
16-
- name: Set up Java
17-
uses: actions/setup-java@v2
18-
with:
19-
java-version: '11'
20-
distribution: 'adopt'
21-
- name: Publish package
22-
run: mvn --batch-mode deploy
23-
env:
24-
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
25-
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
11+
- name: Generate API Doc
12+
run: sbt doc
13+
- name: Make API Doc directory outside repository
14+
run: mkdir ../api_docs
15+
- name: Move API Docs to outside directory
16+
run: mv target/scala-[0-9].[0-9][0-9] ../api_docs/
17+
- name: check something
18+
run: ls ../api_docs
19+
- name: git checkout master
20+
run: |
21+
git fetch
22+
git checkout master
23+
- name: something else2
24+
run: pwd
25+
- name: something else3
26+
run: ls ../
27+
28+
# publish-package:
29+
# runs-on: ubuntu-latest
30+
# needs: [publish-doc]
31+
# steps:
32+
# - uses: actions/checkout@v2
33+
# - name: Set up Java
34+
# uses: actions/setup-java@v2
35+
# with:
36+
# java-version: '11'
37+
# distribution: 'adopt'
38+
# - name: Publish package
39+
# run: mvn --batch-mode deploy
40+
# env:
41+
# SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
42+
# SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}

.github/workflows/tests.yml

Lines changed: 94 additions & 94 deletions
Original file line numberDiff line numberDiff line change
@@ -1,94 +1,94 @@
1-
name: Unittests
2-
on: [push]
3-
jobs:
4-
retrieve-scala-versions:
5-
runs-on: ubuntu-20.04
6-
steps:
7-
- uses: actions/checkout@v2
8-
- name: Set up JDK 11
9-
uses: actions/setup-java@v2
10-
with:
11-
java-version: '11'
12-
distribution: 'adopt'
13-
- name: Retrieve Scala Versions from build.sbt file
14-
id: set-matrix
15-
run: |
16-
scalaVersionPref=$(sbt +scalaBinaryVersion | sed -r 's/[^ \t\r\n\v\f0-9\.]([0-9]\.[0-9]+)/SCALA_VERSION\1/' | grep -oE 'CALA_VERSION[0-9]\.[0-9]+')
17-
scala_versions=$(echo "$scalaVersionPref" | sed -r 's/CALA_VERSION([0-9]\.[0-9]+)/\1/' | tr '\n' ',')
18-
scala_versions="[${scala_versions%?}]"
19-
echo ::set-output name=matrix::"$scala_versions"
20-
outputs:
21-
scala_versions: ${{ steps.set-matrix.outputs.matrix }}
22-
23-
test-coverage:
24-
runs-on: ubuntu-20.04
25-
steps:
26-
- uses: actions/checkout@v2
27-
- name: Set up JDK 11
28-
uses: actions/setup-java@v2
29-
with:
30-
java-version: '11'
31-
distribution: 'adopt'
32-
- name: Cache Java modules
33-
uses: actions/cache@v2
34-
env:
35-
cache-name: cache-java-modules
36-
with:
37-
path: ~/.m2
38-
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('./build.sbt') }}
39-
restore-keys: |
40-
${{ runner.os }}-build-${{ env.cache-name }}-
41-
${{ runner.os }}-build-
42-
${{ runner.os }}-
43-
- name: Cache Scala modules
44-
uses: actions/cache@v2
45-
env:
46-
cache-name: cache-scala-modules
47-
with:
48-
path: ~/.m2
49-
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('./build.sbt') }}
50-
restore-keys: |
51-
${{ runner.os }}-build-${{ env.cache-name }}-
52-
${{ runner.os }}-build-
53-
${{ runner.os }}-
54-
- name: Cache Sbt modules
55-
uses: actions/cache@v2
56-
env:
57-
cache-name: cache-sbt-modules
58-
with:
59-
path: ~/.sbt/1.0
60-
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('./build.sbt') }}
61-
restore-keys: |
62-
${{ runner.os }}-build-${{ env.cache-name }}-
63-
${{ runner.os }}-build-
64-
${{ runner.os }}-
65-
- name: Run Sbt Test and Generate Report on Multiple Scala Versions
66-
run: |
67-
sbt +coverage +test
68-
sbt +coverageReport
69-
- uses: actions/upload-artifact@v2
70-
with:
71-
name: coverage-report
72-
path: ./target/scala-[0-9].[0-9][0-9]
73-
74-
upload-coverage:
75-
runs-on: ubuntu-latest
76-
needs: [retrieve-scala-versions, test-coverage]
77-
strategy:
78-
fail-fast: false
79-
matrix:
80-
scala_version: ${{ fromJSON(needs.retrieve-scala-versions.outputs.scala_versions) }}
81-
steps:
82-
- uses: actions/checkout@v2
83-
- uses: actions/download-artifact@v2
84-
with:
85-
name: coverage-report
86-
path: ./target/
87-
- uses: codecov/codecov-action@v2
88-
with:
89-
token: ${{ secrets.CODECOV_TOKEN }}
90-
directory: ./target/scala-${{ matrix.scala_version }}/
91-
flags: unittests,${{ matrix.scala_version }}/scoverage-report/scoverage.xml
92-
name: codecov-json-logic-scala
93-
fail_ci_if_error: true
94-
verbose: true
1+
#name: Unittests
2+
#on: [push]
3+
#jobs:
4+
# retrieve-scala-versions:
5+
# runs-on: ubuntu-20.04
6+
# steps:
7+
# - uses: actions/checkout@v2
8+
# - name: Set up JDK 11
9+
# uses: actions/setup-java@v2
10+
# with:
11+
# java-version: '11'
12+
# distribution: 'adopt'
13+
# - name: Retrieve Scala Versions from build.sbt file
14+
# id: set-matrix
15+
# run: |
16+
# scalaVersionPref=$(sbt +scalaBinaryVersion | sed -r 's/[^ \t\r\n\v\f0-9\.]([0-9]\.[0-9]+)/SCALA_VERSION\1/' | grep -oE 'CALA_VERSION[0-9]\.[0-9]+')
17+
# scala_versions=$(echo "$scalaVersionPref" | sed -r 's/CALA_VERSION([0-9]\.[0-9]+)/\1/' | tr '\n' ',')
18+
# scala_versions="[${scala_versions%?}]"
19+
# echo ::set-output name=matrix::"$scala_versions"
20+
# outputs:
21+
# scala_versions: ${{ steps.set-matrix.outputs.matrix }}
22+
#
23+
# test-coverage:
24+
# runs-on: ubuntu-20.04
25+
# steps:
26+
# - uses: actions/checkout@v2
27+
# - name: Set up JDK 11
28+
# uses: actions/setup-java@v2
29+
# with:
30+
# java-version: '11'
31+
# distribution: 'adopt'
32+
# - name: Cache Java modules
33+
# uses: actions/cache@v2
34+
# env:
35+
# cache-name: cache-java-modules
36+
# with:
37+
# path: ~/.m2
38+
# key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('./build.sbt') }}
39+
# restore-keys: |
40+
# ${{ runner.os }}-build-${{ env.cache-name }}-
41+
# ${{ runner.os }}-build-
42+
# ${{ runner.os }}-
43+
# - name: Cache Scala modules
44+
# uses: actions/cache@v2
45+
# env:
46+
# cache-name: cache-scala-modules
47+
# with:
48+
# path: ~/.m2
49+
# key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('./build.sbt') }}
50+
# restore-keys: |
51+
# ${{ runner.os }}-build-${{ env.cache-name }}-
52+
# ${{ runner.os }}-build-
53+
# ${{ runner.os }}-
54+
# - name: Cache Sbt modules
55+
# uses: actions/cache@v2
56+
# env:
57+
# cache-name: cache-sbt-modules
58+
# with:
59+
# path: ~/.sbt/1.0
60+
# key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('./build.sbt') }}
61+
# restore-keys: |
62+
# ${{ runner.os }}-build-${{ env.cache-name }}-
63+
# ${{ runner.os }}-build-
64+
# ${{ runner.os }}-
65+
# - name: Run Sbt Test and Generate Report on Multiple Scala Versions
66+
# run: |
67+
# sbt +coverage +test
68+
# sbt +coverageReport
69+
# - uses: actions/upload-artifact@v2
70+
# with:
71+
# name: coverage-report
72+
# path: ./target/scala-[0-9].[0-9][0-9]
73+
#
74+
# upload-coverage:
75+
# runs-on: ubuntu-latest
76+
# needs: [retrieve-scala-versions, test-coverage]
77+
# strategy:
78+
# fail-fast: false
79+
# matrix:
80+
# scala_version: ${{ fromJSON(needs.retrieve-scala-versions.outputs.scala_versions) }}
81+
# steps:
82+
# - uses: actions/checkout@v2
83+
# - uses: actions/download-artifact@v2
84+
# with:
85+
# name: coverage-report
86+
# path: ./target/
87+
# - uses: codecov/codecov-action@v2
88+
# with:
89+
# token: ${{ secrets.CODECOV_TOKEN }}
90+
# directory: ./target/scala-${{ matrix.scala_version }}/
91+
# flags: unittests,${{ matrix.scala_version }}/scoverage-report/scoverage.xml
92+
# name: codecov-json-logic-scala
93+
# fail_ci_if_error: true
94+
# verbose: true

0 commit comments

Comments
 (0)