Skip to content

Commit

Permalink
add github action
Browse files Browse the repository at this point in the history
  • Loading branch information
Piasy committed Jan 10, 2025
1 parent fbd5411 commit e41d1be
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 0 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/test_and_run_demo.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# https://github.com/Kotlin/multiplatform-library-template/blob/main/.github/workflows/gradle.yml
# https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle

name: kmp-socketio build and test.

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
workflow_call:

permissions:
contents: read

jobs:
build:
strategy:
fail-fast: false
matrix:
include:
- cmd: "${GITHUB_WORKSPACE}/gradlew :kmp-socketio:jvmTest --info"
os: ubuntu-latest
dep: "cd ${GITHUB_WORKSPACE}/kmp-socketio/src/jvmTest/resources/ && npm install"
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: 'gradle'
- uses: gradle/actions/setup-gradle@v3
- uses: actions/setup-node@v4
with:
node-version: 14
- if: ${{ matrix.dep }}
run: ${{ matrix.dep }}
- if: ${{ matrix.os == 'windows-latest' }}
shell: cmd
run: ${{ matrix.cmd }}
- if: ${{ matrix.os != 'windows-latest' }}
run: ${{ matrix.cmd }}
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

KMP implementation of SocketIO client.

![Main branch status](https://github.com/HackWebRTC/kmp-socketio/actions/workflows/test_and_run_demo.yaml/badge.svg?branch=main)

## Credit

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

0 comments on commit e41d1be

Please sign in to comment.