Skip to content

Commit 8da5f03

Browse files
committed
add github action
1 parent fbd5411 commit 8da5f03

File tree

4 files changed

+48
-0
lines changed

4 files changed

+48
-0
lines changed
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# https://github.com/Kotlin/multiplatform-library-template/blob/main/.github/workflows/gradle.yml
2+
# https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle
3+
4+
name: kmp-socketio build and test.
5+
6+
on:
7+
push:
8+
branches: [ "main" ]
9+
pull_request:
10+
branches: [ "main" ]
11+
workflow_call:
12+
13+
permissions:
14+
contents: read
15+
16+
jobs:
17+
build:
18+
strategy:
19+
fail-fast: false
20+
matrix:
21+
include:
22+
- cmd: "${GITHUB_WORKSPACE}/gradlew :kmp-socketio:jvmTest --info"
23+
os: ubuntu-latest
24+
dep: "cd ${GITHUB_WORKSPACE}/kmp-socketio/src/jvmTest/resources/ && npm install"
25+
runs-on: ${{ matrix.os }}
26+
27+
steps:
28+
- uses: actions/checkout@v4
29+
with:
30+
submodules: 'recursive'
31+
- uses: actions/setup-java@v4
32+
with:
33+
java-version: '17'
34+
distribution: 'temurin'
35+
cache: 'gradle'
36+
- uses: gradle/actions/setup-gradle@v3
37+
- uses: actions/setup-node@v4
38+
with:
39+
node-version: 14
40+
- if: ${{ matrix.dep }}
41+
run: ${{ matrix.dep }}
42+
- if: ${{ matrix.os == 'windows-latest' }}
43+
shell: cmd
44+
run: ${{ matrix.cmd }}
45+
- if: ${{ matrix.os != 'windows-latest' }}
46+
run: ${{ matrix.cmd }}

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
KMP implementation of SocketIO client.
44

5+
![Main branch status](https://github.com/HackWebRTC/kmp-socketio/actions/workflows/test_and_run_demo.yaml/badge.svg?branch=main)
6+
57
## Credit
68

79
+ [joffrey-bion/socketio-kotlin](https://github.com/joffrey-bion/socketio-kotlin)

gradlew

100644100755
File mode changed.

gradlew.bat

100644100755
File mode changed.

0 commit comments

Comments
 (0)