Bump ws from 7.3.1 to 7.5.9 in /.github/screenshot #305
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |