From 6643cce84149068d8ab062e73a09f319d9cdf967 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Sun, 21 Jun 2020 13:18:06 +0200 Subject: [PATCH] ci: install node and run yarn for e2e tests --- .github/workflows/ci.yml | 7 +++++++ e2e/setup.sh | 6 ++++++ 2 files changed, 13 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0e536cfef..f5c8d8a8c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -121,6 +121,9 @@ jobs: - uses: actions/setup-python@v1 with: python-version: '3.8' + - uses: actions/setup-node@v1 + with: + node-version: '12' - name: Install dependencies run: | sudo pip install -U wheel pipenv @@ -130,6 +133,10 @@ jobs: cd e2e docker-compose pull -q chrome docker-compose up -d chrome + - name: Build static files for e2e test + run: | + cd passbook/static/static + yarn - name: Run coverage run: pipenv run coverage run ./manage.py test --failfast - name: Create XML Report diff --git a/e2e/setup.sh b/e2e/setup.sh index 7eb5e4116..a0f0d67ad 100755 --- a/e2e/setup.sh +++ b/e2e/setup.sh @@ -1,6 +1,12 @@ #!/bin/bash -x sudo apt update +# Setup python sudo apt install -y python3.8 python3-pip apt-transport-https ca-certificates curl gnupg-agent software-properties-common +# Setup nodejs +curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash - +sudo apt-get install -y nodejs +sudo npm install -g yarn +# Setup docker curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - sudo add-apt-repository \ "deb [arch=amd64] https://download.docker.com/linux/ubuntu \