From 37bcaf52b13ce4cad4307521f0a68a80bed801fb Mon Sep 17 00:00:00 2001 From: Oliver Wipfli Date: Sun, 19 Sep 2021 08:56:47 +0200 Subject: [PATCH] Split CI (#353) --- .github/workflows/ci.yml | 130 ------------------------- .github/workflows/lint.yml | 35 +++++++ .github/workflows/test-browser.yml | 33 +++++++ .github/workflows/test-expressions.yml | 22 +++++ .github/workflows/test-query.yml | 30 ++++++ .github/workflows/test-unit.yml | 49 ++++++++++ 6 files changed, 169 insertions(+), 130 deletions(-) delete mode 100644 .github/workflows/ci.yml create mode 100644 .github/workflows/lint.yml create mode 100644 .github/workflows/test-browser.yml create mode 100644 .github/workflows/test-expressions.yml create mode 100644 .github/workflows/test-query.yml create mode 100644 .github/workflows/test-unit.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index 59513c2bb1..0000000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,130 +0,0 @@ -# This workflow will install node dependencies, build the source code and run the tests - -name: CI - -on: - push: - branches: [main] - pull_request: - -jobs: - lint_build_test: - strategy: - fail-fast: false - matrix: - os: - - macos-latest - - windows-latest - node_version: - - 14 - architecture: - - x64 - - name: ${{ matrix.os }} - runs-on: ${{ matrix.os }} - timeout-minutes: 20 - steps: - - uses: actions/checkout@v2 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v2-beta - with: - node-version: ${{ matrix.node_version }} - architecture: ${{ matrix.architecture }} - - run: npm ci - - - run: npm run lint - - run: npm run build-dev - - run: npm run test-unit - - lint: - runs-on: ubuntu-latest - timeout-minutes: 20 - steps: - - uses: actions/checkout@v2 - - name: Use Node.js 14 x64 - uses: actions/setup-node@v2-beta - with: - node-version: 14 - architecture: x64 - - run: npm ci - - run: npm run lint - - run: npm run lint-docs - - run: npm run lint-css - - test-unit: - runs-on: ubuntu-latest - timeout-minutes: 20 - steps: - - uses: actions/checkout@v2 - - name: Use Node.js 14 x64 - uses: actions/setup-node@v2-beta - with: - node-version: 14 - architecture: x64 - - run: npm ci - - run: npm run build-dev - # see: https://github.com/stackgl/headless-gl#how-can-headless-gl-be-used-on-a-headless-linux-machine - - run: xvfb-run -s "-ac -screen 0 1280x1024x24" npm run test-unit - - test-query: - runs-on: ubuntu-latest - timeout-minutes: 20 - steps: - - uses: actions/checkout@v2 - - name: Use Node.js 14 x64 - uses: actions/setup-node@v2-beta - with: - node-version: 14 - architecture: x64 - - run: npm ci - - run: npm run build-dev - - run: npm run test-query - - uses: actions/upload-artifact@v2 - with: - path: ./test/integration/query-tests - name: querytests - - uses: actions/upload-artifact@v2 - with: - path: ./test/integration/query-tests/index.html - name: querytests.html - - test-expressions: - runs-on: ubuntu-latest - timeout-minutes: 20 - steps: - - uses: actions/checkout@v2 - - name: Use Node.js 14 x64 - uses: actions/setup-node@v2-beta - with: - node-version: 14 - architecture: x64 - - run: npm ci - - run: npm run build-dev - - run: npm run test-expressions - - test-browser: - timeout-minutes: 20 - # These are a bit flaky and occasionally time out - continue-on-error: true - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Use Node.js 14 x64 - uses: actions/setup-node@v2-beta - with: - node-version: 14 - architecture: x64 - - run: npm ci - - run: npm run build-dev - - run: DETECT_CHROMEDRIVER_VERSION=true npm install -g chromedriver - - run: npm install -g geckodriver@2.0.4 - - name: Test Chrome - env: - SELENIUM_BROWSER: chrome - TAP_COLORS: 1 - run: xvfb-run -s "-ac -screen 0 1280x1024x24" npm run test-browser - - name: Test Firefox - env: - SELENIUM_BROWSER: firefox - TAP_COLORS: 1 - run: xvfb-run -s "-ac -screen 0 1280x1024x24" npm run test-browser diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000000..d3c28b7492 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,35 @@ +name: Lint + +on: + push: + branches: [main] + pull_request: + +jobs: + lint: + strategy: + fail-fast: false + matrix: + os: + - macos-latest + - windows-latest + - ubuntu-latest + node_version: + - 14 + architecture: + - x64 + + name: ${{ matrix.os }} + runs-on: ${{ matrix.os }} + timeout-minutes: 20 + steps: + - uses: actions/checkout@v2 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v2 + with: + node-version: ${{ matrix.node_version }} + architecture: ${{ matrix.architecture }} + - run: npm ci + - run: npm run lint + - run: npm run lint-docs + - run: npm run lint-css diff --git a/.github/workflows/test-browser.yml b/.github/workflows/test-browser.yml new file mode 100644 index 0000000000..410398a95c --- /dev/null +++ b/.github/workflows/test-browser.yml @@ -0,0 +1,33 @@ +name: Test Browser + +on: + push: + branches: [main] + pull_request: + +jobs: + test_browser: + name: ubuntu-latest + runs-on: ubuntu-latest + timeout-minutes: 20 + steps: + - uses: actions/checkout@v2 + - name: Use Node.js 14 x64 + uses: actions/setup-node@v2 + with: + node-version: 14 + architecture: x64 + - run: npm ci + - run: npm run build-dev + - run: DETECT_CHROMEDRIVER_VERSION=true npm install -g chromedriver + - run: npm install -g geckodriver@2.0.4 + - name: Test Chrome + env: + SELENIUM_BROWSER: chrome + TAP_COLORS: 1 + run: xvfb-run -s "-ac -screen 0 1280x1024x24" npm run test-browser + - name: Test Firefox + env: + SELENIUM_BROWSER: firefox + TAP_COLORS: 1 + run: xvfb-run -s "-ac -screen 0 1280x1024x24" npm run test-browser diff --git a/.github/workflows/test-expressions.yml b/.github/workflows/test-expressions.yml new file mode 100644 index 0000000000..4d8400f42d --- /dev/null +++ b/.github/workflows/test-expressions.yml @@ -0,0 +1,22 @@ +name: Test Expressions + +on: + push: + branches: [main] + pull_request: + +jobs: + test_expressions: + name: ubuntu-latest + runs-on: ubuntu-latest + timeout-minutes: 20 + steps: + - uses: actions/checkout@v2 + - name: Use Node.js 14 x64 + uses: actions/setup-node@v2 + with: + node-version: 14 + architecture: x64 + - run: npm ci + - run: npm run build-dev + - run: npm run test-expressions diff --git a/.github/workflows/test-query.yml b/.github/workflows/test-query.yml new file mode 100644 index 0000000000..128c47b8d0 --- /dev/null +++ b/.github/workflows/test-query.yml @@ -0,0 +1,30 @@ +name: Test Query + +on: + push: + branches: [main] + pull_request: + +jobs: + test_query: + name: ubuntu-latest + runs-on: ubuntu-latest + timeout-minutes: 20 + steps: + - uses: actions/checkout@v2 + - name: Use Node.js 14 x64 + uses: actions/setup-node@v2 + with: + node-version: 14 + architecture: x64 + - run: npm ci + - run: npm run build-dev + - run: npm run test-query + - uses: actions/upload-artifact@v2 + with: + path: ./test/integration/query-tests + name: querytests + - uses: actions/upload-artifact@v2 + with: + path: ./test/integration/query-tests/index.html + name: querytests.html diff --git a/.github/workflows/test-unit.yml b/.github/workflows/test-unit.yml new file mode 100644 index 0000000000..78c9088fef --- /dev/null +++ b/.github/workflows/test-unit.yml @@ -0,0 +1,49 @@ +name: Test Unit + +on: + push: + branches: [main] + pull_request: + +jobs: + test_unit_win_mac: + strategy: + fail-fast: false + matrix: + os: + - macos-latest + - windows-latest + node_version: + - 14 + architecture: + - x64 + + name: ${{ matrix.os }} + runs-on: ${{ matrix.os }} + timeout-minutes: 20 + steps: + - uses: actions/checkout@v2 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v2 + with: + node-version: ${{ matrix.node_version }} + architecture: ${{ matrix.architecture }} + - run: npm ci + - run: npm run build-dev + - run: npm run test-unit + + test_unit_ubuntu: + name: ubuntu-latest + runs-on: ubuntu-latest + timeout-minutes: 20 + steps: + - uses: actions/checkout@v2 + - name: Use Node.js 14 x64 + uses: actions/setup-node@v2 + with: + node-version: 14 + architecture: x64 + - run: npm ci + - run: npm run build-dev + # see: https://github.com/stackgl/headless-gl#how-can-headless-gl-be-used-on-a-headless-linux-machine + - run: xvfb-run -s "-ac -screen 0 1280x1024x24" npm run test-unit