-
Notifications
You must be signed in to change notification settings - Fork 330
126 lines (120 loc) · 3.42 KB
/
Copy pathapklab.yml
File metadata and controls
126 lines (120 loc) · 3.42 KB
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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
name: CI
on:
push:
branches:
- master
tags:
- v*
pull_request:
branches:
- master
jobs:
build-and-test:
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
name:
- lint
- linux-build-test
- macos-build-test
- windows-build-test
include:
- name: lint
os: ubuntu-latest
- name: linux-build-test
os: ubuntu-latest
run_test: true
- name: macos-build-test
os: macos-latest
run_test: true
- name: windows-build-test
os: windows-latest
run_test: true
steps:
- name: Checkout repo
uses: actions/checkout@v5
with:
submodules: recursive
- name: Install Node.js
uses: actions/setup-node@v6
with:
node-version: 24
cache: "yarn"
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Run Linter
if: matrix.name == 'lint'
run: yarn lint
- name: Package extension
if: matrix.name != 'lint'
run: yarn package
- name: Setup python
if: matrix.run_test == true
uses: actions/setup-python@v6
with:
python-version: "3.12"
- name: Install quark-engine
continue-on-error: true
if: matrix.run_test == true
shell: bash
run: |
pip install -U quark-engine
# get quark-engine rules
freshquark
# check if it installed properly
quark --help
quark -a testdata/simplekeyboard/test.apk -s
- name: Get VS Code stable release version
if: matrix.run_test == true
id: code-stable
shell: bash
run: |
echo "VSCODE_VERSION=`curl --silent https://update.code.visualstudio.com/api/releases/stable | jq -r '.[0]'`" >> "$GITHUB_OUTPUT"
- name: Cache VS Code download for testing
if: matrix.run_test == true
uses: actions/cache@v4
with:
path: |
.vscode-test
key: ${{ runner.os }}-vscode-test-cache-${{ steps.code-stable.outputs.VSCODE_VERSION }}
- name: Run tests
if: matrix.run_test == true
shell: bash
run: |
if [ "$RUNNER_OS" == "Linux" ]; then
xvfb-run -a yarn test
elif [ "$RUNNER_OS" == "Windows" ]; then
yarn test || true
else
yarn test
fi
- uses: actions/upload-artifact@v5
if: matrix.name == 'linux-build-test'
with:
name: apklab.vsix
path: apklab*.vsix
release:
name: release
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v5
with:
submodules: recursive
- name: Install Node.js
uses: actions/setup-node@v6
with:
node-version: 24
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Package extension
run: yarn package
- name: Release [open-vsx]
run: |
yarn add ovsx
yarn ovsx publish apklab*.vsix -p ${{ secrets.OPEN_VSX_TOKEN }}
- name: Release [marketplace]
run: yarn vsce publish -p ${{ secrets.VS_MARKETPLACE_TOKEN }} --yarn