Work on a proper mquery package #999
Workflow file for this run
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
name: "Code testing" | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
jobs: | |
expression_blacklist: | |
name: expression blacklist | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- run: git fetch origin master | |
- name: No "console.log" please | |
run: git diff origin/master -- "*.js" | grep "^[+][^+]" | grep -v "noqa" | grep "console.log" || exit 0 && exit 1 | |
test_python_types: | |
name: python mypy | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup Python | |
uses: actions/setup-python@v1 | |
with: | |
python-version: '3.10' | |
- name: install mypy==0.790 | |
run: pip3 install mypy==0.790 | |
- name: install requirements | |
run: pip3 install -r requirements.txt | |
- name: run mypy | |
run: mypy src | |
test_python_style: | |
name: python flake8 | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup Python | |
uses: actions/setup-python@v1 | |
with: | |
python-version: '3.10' | |
- name: install flake8==3.7.9 | |
run: pip3 install flake8==3.7.9 | |
- name: run flake8 | |
run: flake8 src | |
test_python_lint: | |
name: python black | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup Python | |
uses: actions/setup-python@v1 | |
with: | |
python-version: '3.10' | |
- name: install black | |
run: pip3 install black==22.3.0 | |
- name: run black | |
run: black --check "src" | |
test_js_style: | |
name: js prettier | |
runs-on: ubuntu-latest | |
env: | |
working-directory: src/mqueryfront | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup nodejs | |
uses: actions/setup-node@v1 | |
with: | |
node-version: '12.x' | |
- name: install prettier | |
run: npm install -g [email protected] | |
- name: run prettier | |
run: prettier --tab-width=4 --check "src/**/*.js" | |
test_js_build: | |
name: npm build | |
runs-on: ubuntu-latest | |
env: | |
working-directory: src/mqueryfront | |
steps: | |
- name: Setup nodejs | |
uses: actions/setup-node@v1 | |
with: | |
node-version: '12.x' | |
- name: install dependencies | |
run: npm install | |
- name: build | |
run: npm build | |
test_unit: | |
name: unit tests | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
- name: build test image | |
run: docker build -t mquery_tests:latest -f src/tests/Dockerfile . | |
- name: run unit tests | |
run: docker run mquery_tests | |
test_e2e: | |
name: e2e tests | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
- name: build test image | |
run: docker build -t mquery_tests:latest -f src/e2etests/Dockerfile . | |
- name: run docker compose | |
run: docker-compose up --scale daemon=1 --build -d | |
- name: run e2e tests | |
run: docker run --net mquery_default -v $(readlink -f ./samples):/mnt/samples mquery_tests | |
- name: get run logs | |
if: always() | |
run: docker-compose logs | |
- name: stop docker compose | |
if: always() | |
run: docker-compose down |