forked from alxndrsn/bikram-sambat.js
-
Notifications
You must be signed in to change notification settings - Fork 10
95 lines (82 loc) · 2.44 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
name: Test
on: [push, pull_request]
jobs:
js-bootstrap:
name: Test JS bootstrap on Node v${{ matrix.node-version }}
runs-on: ubuntu-18.04
strategy:
matrix:
node-version: [ 12.x, 14.x, 16.x ]
defaults:
run:
working-directory: ./bootstrap
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm test
js-library:
name: Test JS library on Node v${{ matrix.node-version }}
runs-on: ubuntu-18.04
strategy:
matrix:
node-version: [ 12.x, 14.x, 16.x ]
defaults:
run:
working-directory: ./js
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm test
java:
name: Test Java
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]
- name: Set up Java
uses: actions/setup-java@v3
with:
java-version: 11
- name: Setup Android SDK
uses: android-actions/setup-android@v2
- uses: nttld/setup-ndk@v1
id: setup-ndk
with:
ndk-version: r17c
- name: Test
env:
ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }}
run: make test-java
publish:
needs: [js-bootstrap, js-library, java]
runs-on: ubuntu-18.04
steps:
- name: Checkout
uses: actions/[email protected]
- name: Set up Java
uses: actions/[email protected]
with:
java-version: 1.8
- name: Setup Android SDK
uses: android-actions/setup-android@v2
- uses: nttld/setup-ndk@v1
id: setup-ndk
with:
ndk-version: r17c
- name: Set IS_TAG
if: startsWith(github.ref, 'refs/tags/')
run: echo "TAG=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
- run: echo "BRANCH=$BRANCH_NAME" >> $GITHUB_ENV
- name: maven-deploy
if: ${{ github.event_name != 'pull_request' }}
run: |
scripts/ci/maven-deploy java/lib/build/libs/bikram-sambat.jar bikramsambat bikram-sambat
scripts/ci/maven-deploy java/android-lib/build/outputs/aar/android-lib-release.aar bikramsambat bikram-sambat-android