-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
Showing
4 changed files
with
140 additions
and
13 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
name: Goth nightly | ||
|
||
on: | ||
schedule: | ||
# run this workflow every day at 2:00 AM UTC | ||
- cron: '0 2 * * *' | ||
|
||
jobs: | ||
goth-tests: | ||
name: Run integration tests | ||
runs-on: goth | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
ref: 'b0.3' | ||
|
||
- name: Configure node.js | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: '12.18.3' | ||
|
||
- name: Build yajsapi | ||
run: | | ||
sudo apt-get update -y | ||
sudo apt-get install -y build-essential | ||
npm install | ||
npm run-script build | ||
cd examples | ||
npm install | ||
sed -i 's,require("yajsapi");,require("'$([ -f ../dist/index.js ] && echo "../../dist/index.js" || echo "../../dist/yajsapi/index.js")'");,' blender/blender.js | ||
- name: Configure python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.8.0' | ||
|
||
- name: Configure poetry | ||
uses: Gr1N/setup-poetry@v4 | ||
with: | ||
poetry-version: 1.1.6 | ||
working-directory: 'tests/goth' | ||
|
||
- name: Install dependencies | ||
run: | | ||
cd tests/goth/ | ||
poetry env use python3.8 | ||
poetry install | ||
- name: Disconnect Docker containers from default network | ||
continue-on-error: true | ||
run: | | ||
docker network inspect docker_default | ||
sudo apt-get install -y jq | ||
docker network inspect docker_default | jq ".[0].Containers | map(.Name)[]" | tee /dev/stderr | xargs --max-args 1 -- docker network disconnect -f docker_default | ||
- name: Remove Docker containers | ||
continue-on-error: true | ||
run: docker rm -f $(docker ps -a -q) | ||
|
||
- name: Log in to GitHub Docker repository | ||
run: echo ${{ secrets.GITHUB_TOKEN }} | docker login docker.pkg.github.com -u ${{github.actor}} --password-stdin | ||
|
||
- name: Run test suite | ||
env: | ||
GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
cd tests/goth | ||
poetry run poe goth-assets | ||
poetry run poe goth-tests | ||
- name: Upload test logs | ||
uses: actions/upload-artifact@v2 | ||
if: always() | ||
with: | ||
name: goth-logs | ||
path: /tmp/goth-tests | ||
|
||
# Only relevant for self-hosted runners | ||
- name: Remove test logs | ||
if: always() | ||
run: rm -rf /tmp/goth-tests | ||
|
||
# Only relevant for self-hosted runners | ||
- name: Remove poetry virtual env | ||
if: always() | ||
# Python version below should agree with the version set up by this job. | ||
# In future we'll be able to use the `--all` flag here to remove envs for | ||
# all Python versions (https://github.com/python-poetry/poetry/issues/3208). | ||
run: | | ||
cd tests/goth/ | ||
poetry env remove python3.8 |
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
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
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