Skip to content

Commit 29c36b0

Browse files
authored
build: fixed github actions (#353)
* build: fixed github actions * test: improved test suite * test: improved and simplified git hub actions * test: make test_suite.sh executable * docs: formatting & improvements
1 parent 3bca47d commit 29c36b0

21 files changed

+522
-534
lines changed

.github/workflows/build.yml

Lines changed: 7 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
name: build
22

3-
# https://docs.github.com/en/free-pro-team@latest/actions/managing-workflow-runs/adding-a-workflow-status-badge
4-
53
on:
64
push:
75
branches: [ master ]
@@ -11,26 +9,24 @@ on:
119
jobs:
1210
build:
1311
strategy:
12+
fail-fast: false
1413
matrix:
1514
os:
1615
- ubuntu-20.04
1716
# macos-10.15
1817
- windows-2022
1918
runs-on: ${{ matrix.os }}
2019
timeout-minutes: 30
21-
# defaults:
22-
# run:
23-
# shell: bash
24-
# working-directory: $GITHUB_WORKSPACE
2520

2621
steps:
2722
- uses: actions/checkout@v2
28-
# https://stackoverflow.com/questions/56726429/how-to-run-multiple-commands-in-one-github-actions-docker
29-
30-
- name: Set up JDK 11
31-
uses: actions/setup-java@v1
23+
- uses: actions/setup-java@v3
3224
with:
33-
java-version: 11
25+
distribution: 'zulu'
26+
java-version: '11'
27+
- uses: fwilhe2/setup-kotlin@main
28+
with:
29+
version: 1.6.21
3430

3531
- name: Install dependencies for ${{ runner.os }}
3632
shell: bash
@@ -41,75 +37,10 @@ jobs:
4137
cp /c/msys64/usr/bin/bash.exe /c/Windows/System32/bash.exe
4238
fi
4339
44-
# - name: Update system dependencies
45-
# run: |
46-
# sudo apt-get update
47-
# sudo apt-get install -y curl unzip zip wget
48-
49-
- name: Install sdkman
50-
shell: bash
51-
run: |
52-
bash -c "curl -s "https://get.sdkman.io" | bash"
53-
source "$HOME/.sdkman/bin/sdkman-init.sh"
54-
55-
- name: Install kotlin
56-
shell: bash
57-
run: |
58-
source "$HOME/.sdkman/bin/sdkman-init.sh"
59-
sdk install kotlin 1.4.31
60-
61-
- name: Install gradle
62-
shell: bash
63-
run: |
64-
source "$HOME/.sdkman/bin/sdkman-init.sh"
65-
sdk install gradle 6.7
66-
67-
68-
# https://stackoverflow.com/questions/50104666/gradle-difference-between-test-and-check
69-
- name: Build and test with Gradle
70-
# working-directory: $GITHUB_WORKSPACE
71-
shell: bash
72-
run: |
73-
echo $GITHUB_WORKSPACE
74-
chmod +x gradlew
75-
./gradlew clean check --stacktrace --info
76-
77-
78-
- name: Build kscript
79-
run: ./gradlew assemble
80-
81-
- name: Install assert.sh
82-
shell: bash
83-
run: |
84-
curl -sLO https://raw.github.com/lehmannro/assert.sh/v1.1/assert.sh
85-
chmod +x assert.sh
86-
87-
# https://docs.github.com/en/actions/reference/workflow-commands-for-github-actions#adding-a-system-path
88-
- name: Update PATH to include kscript
89-
shell: bash
90-
run: echo "${GITHUB_WORKSPACE}/build/libs" >> $GITHUB_PATH
91-
92-
- run: which kscript
93-
shell: bash
94-
95-
- name: Print --version
96-
shell: bash
97-
run: |
98-
source "$HOME/.sdkman/bin/sdkman-init.sh"
99-
kscript --version
100-
101-
- name: Create mock idea executable
102-
shell: bash
103-
run: |
104-
touch idea
105-
chmod +x idea
106-
echo "${PWD}" >> $GITHUB_PATH
107-
10840
- name: Run tests
10941
timeout-minutes: 10
11042
shell: bash
11143
if: ${{ runner.os != 'Windows' }}
11244
run: |
113-
source "$HOME/.sdkman/bin/sdkman-init.sh"
11445
export KSCRIPT_HOME="$GITHUB_WORKSPACE"
11546
./test/test_suite.sh

0 commit comments

Comments
 (0)