Skip to content

Commit

Permalink
Split CI (maplibre#353)
Browse files Browse the repository at this point in the history
  • Loading branch information
wipfli authored Sep 19, 2021
1 parent d861b63 commit 37bcaf5
Show file tree
Hide file tree
Showing 6 changed files with 169 additions and 130 deletions.
130 changes: 0 additions & 130 deletions .github/workflows/ci.yml

This file was deleted.

35 changes: 35 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -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
33 changes: 33 additions & 0 deletions .github/workflows/test-browser.yml
Original file line number Diff line number Diff line change
@@ -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
22 changes: 22 additions & 0 deletions .github/workflows/test-expressions.yml
Original file line number Diff line number Diff line change
@@ -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
30 changes: 30 additions & 0 deletions .github/workflows/test-query.yml
Original file line number Diff line number Diff line change
@@ -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
49 changes: 49 additions & 0 deletions .github/workflows/test-unit.yml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 37bcaf5

Please sign in to comment.