mirror of
https://github.com/visgl/react-map-gl.git
synced 2026-01-25 16:02:50 +00:00
Migrate CI to Github Actions (#1235)
This commit is contained in:
parent
2503013e42
commit
7f421737e0
33
.github/workflows/test.yml
vendored
Normal file
33
.github/workflows/test.yml
vendored
Normal file
@ -0,0 +1,33 @@
|
||||
name: test
|
||||
|
||||
# On every pull request, but only on push to master
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
pull_request_target:
|
||||
|
||||
jobs:
|
||||
test-node:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2.1.1
|
||||
|
||||
- name: Use Node.js
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: '12.x'
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
yarn bootstrap
|
||||
|
||||
- name: Run tests
|
||||
run: |
|
||||
yarn test ci
|
||||
|
||||
- name: Coveralls
|
||||
uses: coverallsapp/github-action@master
|
||||
with:
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
41
.github/workflows/website.yml
vendored
Normal file
41
.github/workflows/website.yml
vendored
Normal file
@ -0,0 +1,41 @@
|
||||
name: website
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- '*-release'
|
||||
|
||||
jobs:
|
||||
publish-website:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
if: github.repository_owner == 'visgl'
|
||||
|
||||
env:
|
||||
MapboxAccessToken: ${{ secrets.MAPBOX_ACCESS_TOKEN }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2.1.1
|
||||
|
||||
- name: Use Node.js
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: '12.x'
|
||||
|
||||
- name: Get version
|
||||
id: get-version
|
||||
run: LATEST=$(npm show react-map-gl version | grep -o -E "^[0-9]+\.[0-9]+") && echo "::set-output name=latest::/${LATEST}-release"
|
||||
|
||||
- name: Check version
|
||||
if: ${{ !endsWith(github.ref, steps.get-version.outputs.latest) }}
|
||||
run: |
|
||||
echo "Website is only published from the latest release branch"
|
||||
|
||||
- name: Build & deploy website
|
||||
if: ${{ endsWith(github.ref, steps.get-version.outputs.latest) }}
|
||||
run: |
|
||||
yarn bootstrap
|
||||
cd website
|
||||
yarn
|
||||
yarn build
|
||||
yarn deploy
|
||||
23
.travis.yml
23
.travis.yml
@ -1,23 +0,0 @@
|
||||
language: node_js
|
||||
os: linux
|
||||
sudo: required
|
||||
dist: trusty
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- mesa-utils
|
||||
- xvfb
|
||||
- libgl1-mesa-dri
|
||||
- libglapi-mesa
|
||||
- libosmesa6
|
||||
- libxi-dev
|
||||
node_js:
|
||||
- '10'
|
||||
install:
|
||||
- yarn bootstrap
|
||||
before_script:
|
||||
- export DISPLAY=:99.0; sh -e /etc/init.d/xvfb start
|
||||
script:
|
||||
- npm run test ci
|
||||
after_success:
|
||||
- cat coverage/lcov.info | coveralls
|
||||
Loading…
x
Reference in New Issue
Block a user