Files
appimage.github.io/.github/workflows/test.yml
T
Andy Alt 16d18c2771 fix deployment, use ${{ secrets.GITHUB_TOKEN }} (#2566)
I'm not sure if this will fix it or not...
(#2472)
2021-07-11 20:42:05 +02:00

59 lines
3.0 KiB
YAML

on:
push:
# The ignored paths must not include md files for the website itself
paths-ignore:
- '*.md'
pull_request:
paths-ignore:
- '*.md'
env:
DISPLAY: :99
IS_PULLREQUEST: ${{ github.event_name == 'pull_request' }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
build:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
# https://github.com/actions/checkout#Fetch-all-history-for-all-tags-and-branches
# According to the docs for checkout@v2, Only a single commit is fetched by default, but
# providing a fetch-depth of 0 should fetch all history.
with:
fetch-depth: 0
- name: Install dependencies
run: |
sudo apt update
sudo apt-get -qq -y install sudo imagemagick libasound2-dev pulseaudio-utils alsa-utils alsa-oss libjack0 desktop-file-utils xmlstarlet xterm xvfb icewm x11-utils x11-apps netpbm xdotool libgl1-mesa-dri libgl1-mesa-dev mesa-utils libosmesa6 libsdl1.2-dev libsdl2-2.0-0 fonts-wqy-microhei libfile-mimeinfo-perl # appstream # TODO: Cache me!
sudo bash code/prep-dummy-soundcard.sh
sudo gem install dupervisor -v 1.0.5 # To convert ini to yaml files
sudo npm install -g asar # to get pacakges.json from resources/app.asar for electron-builder applications
# npm install -g @alexlafroscia/yaml-merge # to merge yaml files
- name: Main test
run: |
mkdir $HOME/.icewm/
echo "ShowTaskBar = 0" > $HOME/.icewm/preferences
echo "TaskBarAutoHide = 1" > $HOME/.icewm/preferences
echo "TaskBarShowWorkspaces = 0" > $HOME/.icewm/preferences
echo "TaskBarShowAllWindows = 0" > $HOME/.icewm/preferences
echo "TaskBarShowClock = 0" > $HOME/.icewm/preferences
echo "TaskBarShowMailboxStatus = 0" > $HOME/.icewm/preferences
echo "TaskBarShowCPUStatus = 0" > $HOME/.icewm/preferences
echo "TaskBarShowWindowListMenu = 0" > $HOME/.icewm/preferences
# xpra start :99 # Cannot get screenshots to work
Xvfb :99 -screen 0 800x600x24 >/dev/null 2>&1 & # Need to set bit depth, otherwise get some black screenshots
# until xset -q; do echo "Waiting for X server to start..."; sleep 1; done # We are not immediately using it anyway
# Find out which files in data/ have been changed in the last commit
#set -x # Debug #379
FILES=$(git log -1 -p data/ | grep +++ | cut -d '/' -f 2-| sed -e 's|dev/null||g')
echo "Last changed files from the FILES variable:"
echo "$FILES" ; if [ -z "$FILES" ] ; then echo "Variable FILES is empty." && exit 1 ; fi
# Work on these files that have been changed in the last commit
# Check if $FILES is not empty
if [ -n "$FILES" ] ; then for FILE in $FILES ; do echo "$FILE" ; sudo -E bash -e code/worker.sh $(readlink -f "$FILE") ; done ; fi
# xpra stop :99
killall Xvfb
# bundle exec jekyll build # https://help.github.com/en/articles/viewing-jekyll-build-error-messages#configuring-a-third-party-service-to-display-jekyll-build-error-messages