Skip to content

Commit 7dd9526

Browse files
authored
Merge pull request OpenGeoscience#1086 from OpenGeoscience/github-actions
Switch from travis to github actions.
2 parents 61b52a4 + 0a07854 commit 7dd9526

5 files changed

Lines changed: 124 additions & 163 deletions

File tree

.github/workflows/main.yml

Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
name: Build and test
2+
3+
on:
4+
push:
5+
# branches:
6+
# - master
7+
pull_request:
8+
branches:
9+
- master
10+
release:
11+
types:
12+
- created
13+
14+
jobs:
15+
build:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v2
19+
- uses: actions/setup-node@v2
20+
with:
21+
node-version: 15.x
22+
- uses: browser-actions/setup-firefox@latest
23+
- run: sudo apt-get install --yes --no-install-recommends cpio optipng
24+
- run: sudo apt-get remove --yes fonts-lato
25+
- run: fc-list
26+
- run: firefox --version
27+
- run: google-chrome --version
28+
- run: npm install
29+
- run: npm run setup-website
30+
- run: npm run ci-xvfb
31+
- run: npm run ci-build-website
32+
33+
- name: Report coverage
34+
run: |
35+
pip3 install codecov
36+
codecov
37+
38+
- name: On failure, create alternate baseline images in case the new behavior is correct
39+
if: ${{ failure() }}
40+
run: |
41+
pip3 install girder_client
42+
python3 tests/runners/baseline_images.py -cevb _build
43+
- name: Upload test images on failure
44+
if: ${{ failure() }}
45+
uses: actions/upload-artifact@v2
46+
with:
47+
name: images
48+
path: |
49+
_build/images
50+
_build/Baseline*tgz
51+
- name: Upload artifacts
52+
if: ${{ always() }}
53+
uses: actions/upload-artifact@v2
54+
with:
55+
name: dist
56+
path: |
57+
dist/apidocs
58+
dist/built
59+
- name: Upload built website
60+
if: ${{ success() }}
61+
uses: actions/upload-artifact@v2
62+
with:
63+
name: website
64+
path: |
65+
website/public
66+
deploy-website:
67+
if: ${{ github.ref == 'refs/heads/master' }}
68+
needs: build
69+
runs-on: ubuntu-latest
70+
steps:
71+
- name: Import artifacts
72+
uses: actions/download-artifact@v2
73+
with:
74+
name: website
75+
path: website/public
76+
- name: Deploy
77+
uses: peaceiris/actions-gh-pages@v3
78+
with:
79+
github_token: ${{ secrets.GITHUB_TOKEN }}
80+
publish_dir: website/public
81+
force_orphan: true
82+
deploy-releases:
83+
if: ${{ startswith(github.ref, 'refs/tags/') }}
84+
needs: build
85+
runs-on: ubuntu-latest
86+
steps:
87+
- name: Import artifacts
88+
uses: actions/download-artifact@v2
89+
with:
90+
name: dist
91+
path: dist
92+
- name: Create Release
93+
uses: softprops/action-gh-release@v1
94+
env:
95+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
96+
with:
97+
# name: "Version ${{ github.ref }}"
98+
draft: false
99+
prerelease: false
100+
files: |
101+
dist/built/geo.js
102+
dist/built/geo.min.js
103+
dist/built/geo.lean.js
104+
dist/built/geo.lean.min.js
105+
deploy-npm:
106+
if: ${{ startswith(github.ref, 'refs/tags/') }}
107+
needs: build
108+
runs-on: ubuntu-latest
109+
steps:
110+
- uses: actions/checkout@v2
111+
- uses: actions/setup-node@v2
112+
with:
113+
node-version: 15.x
114+
- name: Import artifacts
115+
uses: actions/download-artifact@v2
116+
with:
117+
name: dist
118+
path: dist
119+
- uses: JS-DevTools/npm-publish@v1
120+
with:
121+
token: ${{ secrets.NPM_TOKEN }}
122+
dry-run: true

.travis.yml

Lines changed: 0 additions & 101 deletions
This file was deleted.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
![GeoJS](https://opengeoscience.github.io/geojs/images/logo_256.png)
22

3-
[![Build Status](https://travis-ci.com/OpenGeoscience/geojs.svg?branch=master)](https://travis-ci.com/OpenGeoscience/geojs)
3+
[![Build Status](https://github.com/opengeoscience/geojs/actions/workflows/main.yml/badge.svg)](https://github.com/opengeoscience/geojs/actions)
44
[![codecov.io](https://codecov.io/github/OpenGeoscience/geojs/coverage.svg?branch=master)](https://codecov.io/github/OpenGeoscience/geojs?branch=master)
55
[![DOI](https://img.shields.io/badge/DOI-10.5281%2Fzenodo.15459-blue)](https://dx.doi.org/10.5281/zenodo.15459)
66
[![Gitter](https://badges.gitter.im/OpenGeoscience/geojs.svg)](https://gitter.im/OpenGeoscience/geojs?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)

docs/developers.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,4 +112,4 @@ To make a new GeoJS release:
112112
- Tag the commit on GitHub with a tag of the form vX.Y.Z (e.g., v0.17.0).
113113
- After the release appears on GitHub, update the release notes with the changes since the last release.
114114

115-
Tagging a commit on the master branch will trigger a build on travis-ci.com, at the end of which the new version will be published to npm and the build artifacts will be pushed to the tagged version on GitHub.
115+
Tagging a commit on the master branch will trigger a build on CI, at the end of which the new version will be published to npm and the build artifacts will be pushed to the tagged version on GitHub.

scripts/upload_travis_results.py

Lines changed: 0 additions & 60 deletions
This file was deleted.

0 commit comments

Comments
 (0)