From dfb3588fd54b68fc3b7d61cead7a347a5a3e2a49 Mon Sep 17 00:00:00 2001 From: Aviv Palivoda Date: Thu, 30 Jan 2020 13:44:57 +0200 Subject: [PATCH 1/3] Add python lint to github actions --- .github/workflows/ci.yaml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 032a75e77..f1a38d303 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -62,4 +62,18 @@ jobs: uses: actions-rs/cargo@v1 with: command: clippy - args: --all -- -Dwarnings \ No newline at end of file + args: --all -- -Dwarnings + + lint: + name: Lint Python code with flake8 + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + - uses: actions/setup-python@v1 + with: + python-version: 3.6 + - name: install flake8 + run: python -m pip install flake8 + - name: run lint + run: flake8 . --count --exclude=./.*,./Lib,./vm/Lib --select=E9,F63,F7,F82 --show-source --statistics + \ No newline at end of file From 3b47bb2f61d3d456891d2e1e6c40d1d1324bd989 Mon Sep 17 00:00:00 2001 From: Aviv Palivoda Date: Thu, 30 Jan 2020 13:52:42 +0200 Subject: [PATCH 2/3] Add CPython tests to github actions --- .github/workflows/ci.yaml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index f1a38d303..49ee1d752 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -76,4 +76,18 @@ jobs: run: python -m pip install flake8 - name: run lint run: flake8 . --count --exclude=./.*,./Lib,./vm/Lib --select=E9,F63,F7,F82 --show-source --statistics - \ No newline at end of file + + cpython: + name: Run CPython test suite + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + - name: build rustpython + uses: actions-rs/cargo@v1 + with: + command: build + args: --verbose --all + - name: run tests + run: | + export RUSTPYTHONPATH=`pwd`/Lib + cargo run -- -m test -v From 644076196acde653f75a61ab23199dc468dee0cb Mon Sep 17 00:00:00 2001 From: Aviv Palivoda Date: Thu, 30 Jan 2020 14:33:00 +0200 Subject: [PATCH 3/3] Add wasm test to github actions --- .github/workflows/ci.yaml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 49ee1d752..c483b5651 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -91,3 +91,33 @@ jobs: run: | export RUSTPYTHONPATH=`pwd`/Lib cargo run -- -m test -v + + wasm: + name: Run wasm selenium tests + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + - name: install wasm-pack + run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh + - name: install geckodriver + run: | + wget https://github.com/mozilla/geckodriver/releases/download/v0.24.0/geckodriver-v0.24.0-linux32.tar.gz + mkdir geckodriver + tar -xzf geckodriver-v0.24.0-linux32.tar.gz -C geckodriver + - uses: actions/setup-python@v1 + with: + python-version: 3.6 + - name: Install pipenv + run: | + python -V + python -m pip install --upgrade pip + python -m pip install pipenv + - run: pipenv install + working-directory: ./wasm/tests + - uses: actions/setup-node@v1 + - name: run test + run: | + export PATH=$PATH:`pwd`/../../geckodriver + npm install + npm run test + working-directory: ./wasm/demo