-
Notifications
You must be signed in to change notification settings - Fork 3
28 lines (27 loc) · 1.35 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
name: CI
on:
push:
branches: [ master, dev ]
pull_request:
branches:
- '**'
schedule:
- cron: '0 0 * * 0'
jobs:
make-and-test-cookie:
name: Cookie Instantiation Tests
runs-on: ubuntu-16.04
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
steps:
- uses: actions/checkout@v2
with:
submodules: 'recursive'
# Adapted from https://askubuntu.com/a/524368
- run: echo $(hostname -I | cut -d\ -f1) $(hostname) | sudo -h 127.0.0.1 tee -a /etc/hosts
- uses: docker-practice/actions-setup-docker@v1
# Adapted from https://stackoverflow.com/a/28123384
# RE: puppeteer in Docker,
# see https://github.com/puppeteer/puppeteer/issues/3451#issuecomment-523961368
# and https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md#setting-up-chrome-linux-sandbox
- run: tar -p -cv * | sudo docker run --cap-add=SYS_ADMIN -e "GITHUB_RUN_NUMBER=${GITHUB_RUN_NUMBER}" -e "GITHUB_ACTOR=${GITHUB_ACTOR}" -e "GITHUB_REPOSITORY=${GITHUB_REPOSITORY}" -e "GH_TOKEN=${GH_TOKEN}" -i devosoft/empirical:latest /bin/bash -c "set -x && mkdir /opt/work && tar -px -C /opt/work && cd /opt/work && git config --global user.email '[email protected]' && git config --global user.name 'GitHub Actions' && make test && chmod +x /opt/work/ci/after-success.sh && /opt/work/ci/after-success.sh"