mirror of
https://github.com/maputnik/editor.git
synced 2025-12-06 06:10:00 +00:00
## Launch Checklist This PR uses the maputnik CLI inside the docker container to allow loading of files into the container and watch for changes. - [x] Briefly describe the changes in this PR. - [x] Write tests for all new functionality. - [x] Add an entry to `CHANGELOG.md` under the `## main` section. --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
120 lines
2.9 KiB
YAML
120 lines
2.9 KiB
YAML
name: ci
|
|
|
|
on:
|
|
pull_request:
|
|
branches: [ main ]
|
|
push:
|
|
branches: [ main ]
|
|
|
|
jobs:
|
|
|
|
build-node:
|
|
name: "build on ${{ matrix.os }}"
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
if: ${{ github.event_name == 'push' || github.event_name == 'pull_request' }}
|
|
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [ ubuntu-latest, windows-latest, macos-latest ]
|
|
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
- uses: actions/setup-node@v5
|
|
with:
|
|
node-version-file: '.nvmrc'
|
|
- run: npm ci
|
|
- run: npm run build
|
|
- run: npm run lint
|
|
- run: npm run lint-css
|
|
|
|
|
|
|
|
build-artifacts:
|
|
name: "build artifacts"
|
|
runs-on: ubuntu-latest
|
|
if: ${{ github.event_name == 'push' || github.event_name == 'pull_request' }}
|
|
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
- uses: actions/setup-node@v5
|
|
with:
|
|
node-version-file: '.nvmrc'
|
|
- run: npm ci
|
|
- run: npm run build
|
|
- name: artifacts/maputnik
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: maputnik
|
|
path: dist
|
|
|
|
# Build and upload desktop CLI artifacts
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v6
|
|
with:
|
|
go-version: ^1.23.x
|
|
cache-dependency-path: desktop/go.sum
|
|
id: go
|
|
|
|
- name: Build desktop artifacts
|
|
run: npm run build-desktop
|
|
|
|
- name: Artifacts/linux
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: maputnik-linux
|
|
path: ./desktop/bin/linux/
|
|
|
|
- name: Artifacts/darwin
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: maputnik-darwin
|
|
path: ./desktop/bin/darwin/
|
|
|
|
- name: Artifacts/windows
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: maputnik-windows
|
|
path: ./desktop/bin/windows/
|
|
|
|
e2e-tests:
|
|
name: "E2E tests using chrome"
|
|
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v5
|
|
- run: npm ci
|
|
- name: Cypress run
|
|
uses: cypress-io/github-action@v6
|
|
with:
|
|
build: npm run build
|
|
start: npm run start
|
|
browser: chrome
|
|
- name: Upload coverage reports to Codecov
|
|
uses: codecov/codecov-action@v5
|
|
with:
|
|
files: ${{ github.workspace }}/.nyc_output/out.json
|
|
verbose: true
|
|
|
|
e2e-tests-docker:
|
|
name: "E2E tests using chrome and docker"
|
|
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v5
|
|
- run: npm ci
|
|
- name: Cypress run
|
|
uses: cypress-io/github-action@v6
|
|
with:
|
|
build: docker build -t maputnik .
|
|
start: docker run --rm --network host maputnik --port=8888
|
|
browser: chrome
|
|
- name: Upload coverage reports to Codecov
|
|
uses: codecov/codecov-action@v5
|
|
with:
|
|
files: ${{ github.workspace }}/.nyc_output/out.json
|
|
verbose: true
|