-
Notifications
You must be signed in to change notification settings - Fork 289
60 lines (55 loc) · 1.96 KB
/
pr.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
name: PR
on:
pull_request:
jobs:
tests:
runs-on: ubuntu-latest
steps:
- name: Check out this repo
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: "3.8"
- name: Install Python requirements
run: |-
python -m pip install -U pip
pip install -r requirements.txt
- id: files
uses: jitterbit/get-changed-files@v1
continue-on-error: true
- name: Check for changed static files
run: |
for changed_file in ${{ steps.files.outputs.modified }}; do
if [[ "${changed_file}" =~ ^((all|battleground)-state-changes.csv|(all|battleground)-state-changes.html|(all|battleground)-state-changes.txt|(all|battleground)-state-changes.xml|notification-updates.json)$ ]]; then
echo "Modifications to static files are not allowed."
exit 1
fi
done
- name: Generate battleground-state-changes.txt/html
run: |-
./print-battleground-state-changes
- name: Upload test artifacts
uses: actions/upload-artifact@v2
with:
name: "state-changes"
path: |
battleground-state-changes.*
all-state-changes.*
- name: Generate screenshots
run: |-
sudo apt-get install libwebkit2gtk-4.0-37 libgles2 gstreamer1.0-libav libgstreamer-plugins-bad1.0-0 xvfb
npm install --prefix .github/screenshot
npm start --prefix .github/screenshot
# WebKit doesn't work properly in headless mode, use an Xvfb server
PUPPETEER_PRODUCT=webkit xvfb-run npm start --prefix .github/screenshot
PUPPETEER_PRODUCT=firefox npm install --prefix .github/screenshot puppeteer
PUPPETEER_PRODUCT=firefox npm start --prefix .github/screenshot
- name: Upload screenshots
uses: actions/upload-artifact@v2
with:
name: screenshots
path: |
screenshot-*.png