-
-
Notifications
You must be signed in to change notification settings - Fork 84
136 lines (118 loc) · 4.64 KB
/
Copy pathci.yml
File metadata and controls
136 lines (118 loc) · 4.64 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
127
128
129
130
131
132
133
134
135
136
# This is a basic workflow to help you get started with Actions
name: CI
# Controls when the action will run.
on:
push:
branches:
- master
tags:
- "*"
pull_request:
branches:
- master
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: leafo/gh-actions-lua@v10
with:
luaVersion: "5.1.5"
# Runs a single command using the runners shell
- name: Install and Run Luacheck
uses: nebularg/actions-luacheck@v1
with:
args: -q
# do Busted checkes
- uses: leafo/gh-actions-luarocks@v4.0.0
- name: Build Luarocks
run: |
git config --global url."https://".insteadOf git://
luarocks install mockagne 1.0
luarocks install luaunit
luarocks install luabitop
luarocks install busted
luarocks install luacov
luarocks install luacov-coveralls
luarocks install penlight
luarocks install ldoc
# luarocks install rockspecs/luacov-coveralls-scm-0.rockspec
- name: Run Busted UnitTests
run: |
busted -o utfTerminal --verbose --coverage
# Everything past Busted is build / publish / deploy. On a pull request we
# run lint + unit tests only and STOP here -- no packaging, no Patreon /
# GSE Tools publish, no docs deploy. Each step below is gated on the event
# not being a pull_request.
- name: Log coverage to coveralls.io
if: ${{ success() && github.event_name != 'pull_request' }}
continue-on-error: true
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
export LUA_PATH="./GSE/API/?.lua;$LUA_PATH"
luacov-coveralls -v -e .luarocks
- name: Setup Node
if: ${{ github.event_name != 'pull_request' }}
uses: actions/setup-node@v4
- name: Install SVN
if: ${{ github.event_name != 'pull_request' }}
run: sudo apt-get install -y subversion
- name: Install Dependencies
if: ${{ github.event_name != 'pull_request' }}
run: npm ci
- name: Update GSE/API/Patreon.lua
if: ${{ github.event_name != 'pull_request' }}
run: npm run-script run
env:
NODE_PATREON_TOKEN: ${{secrets.PATREON_CAT }}
# Before packaging: hand CurseForge the enUS phrase list this build was
# made from. CF holds the master list translators work against and only
# learns about new or changed strings when they are uploaded, so without
# this a release can ship strings nobody was ever offered a translation
# for. missing-phrase-handling is DoNothing — a phrase dropped from the
# addon still has community translations attached over there.
- name: Upload enUS localization to CurseForge
if: ${{ github.event_name != 'pull_request' }}
continue-on-error: true
run: npm run upload-locale
env:
CF_API_KEY: ${{ secrets.CF_API_KEY }}
# Runs a set of commands using the runners shell
- name: Create Package Retail
uses: BigWigsMods/packager@master
if: ${{ github.event_name != 'pull_request' }}
env:
CF_API_KEY: ${{ secrets.CF_API_KEY }}
GITHUB_OAUTH: ${{ secrets.GITHUB_TOKEN }}
WOWI_API_TOKEN: ${{ secrets.WOWI_API_TOKEN }}
WAGO_API_TOKEN: ${{ secrets.WAGO_API_TOKEN }}
- name: Publish Patreon
if: ${{ github.event_name != 'pull_request' }}
run: npm run-script pat
env:
DISCORD_WEBHOOK: ${{secrets.DISCORD_WEBHOOK }}
- name: Publish to GSE Tools
if: ${{ github.event_name != 'pull_request' }}
env:
GSE_ACTION_TOKEN: ${{ secrets.GSE_BOT_TOKEN }}
GSE_API_URL: ${{ secrets.GSE_API_URL || 'https://gse.tools/api' }}
GSE_FILE_API_URL: ${{ secrets.GSE_FILE_API_URL || 'https://api.qik.dev' }}
run: npm run publish-gse
- name: Parse and generate documentation
if: ${{ github.event_name != 'pull_request' }}
run: |
mkdir .pages
ldoc -d .pages/docs GSE/API/*.lua
cp pages/* .pages
- name: Deploy API to GitHuib Pages🚀
if: ${{ github.event_name != 'pull_request' }}
uses: JamesIves/github-pages-deploy-action@4.1.4
with:
branch: gh-pages # The branch the action should deploy to.
folder: .pages # The folder the action should deploy.