-
Notifications
You must be signed in to change notification settings - Fork 3
99 lines (94 loc) · 2.9 KB
/
ci.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
95
96
97
98
99
name: CI
on:
push:
branches:
- dev
pull_request:
branches:
- dev
workflow_dispatch:
env:
EXTENSION_TESTER_VERSION: '1.1.2-nao1'
jobs:
verify:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Setup Java 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- name: Setup Python 3.8
uses: actions/setup-python@v4
with:
python-version: '3.8'
- name: Download test tools
run: |
wget -O extension-tester.jar \
https://github.com/noaione/shosetsu-ext-tester/releases/download/v$EXTENSION_TESTER_VERSION/extension-tester.jar
- name: Validate extension/lib files
run: |
python3 ci/validate-index.py
tests:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Setup Java 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- name: Setup Python 3.8
uses: actions/setup-python@v4
with:
python-version: '3.8'
- name: Download test tools
run: |
wget -O extension-tester.jar \
https://github.com/noaione/shosetsu-ext-tester/releases/download/v$EXTENSION_TESTER_VERSION/extension-tester.jar
- name: Test extensions
env:
COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
CI_COMMIT_SHA: ${{ github.sha }}
run: |
python3 ci/multi-test.py \
--print-listings \
--print-list-stats \
--print-novels \
--print-meta \
--test-all-novels \
--ignore-missing
dist:
runs-on: ubuntu-latest
needs: [verify, tests]
# Do not run on PRs
if: github.event_name == 'push'
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Setup Python 3.8
uses: actions/setup-python@v4
with:
python-version: '3.8'
- name: Copy extension files
run: |
mkdir -p final/src
mkdir -p final/lib
cp -r src/* final/src/
cp -r lib/* final/lib/
cp README.md final/
sed -i 's/<!-- REPO-BRANCH-INFO -->/<!-- REPO-BRANCH-INFO -->\n\n> [!NOTE]\n> The following is an auto generated branch from dev branch, if you like to get the latest (and maybe more broken) version please use dev branch./g' final/README.md
- name: Generate index files
run: |
python3 ci/generate-index.py
- name: Deploy to Repo branch
uses: s0/git-publish-subdir-action@develop
env:
BRANCH: repo
REPO: self
FOLDER: final
GITHUB_TOKEN: ${{ secrets.DEPLOY_KEY }}
MESSAGE: "📈 Automatic deployment from noaione/shosetsu-extensions@{long-sha}"