Skip to content

Commit

Permalink
Merge pull request #401 from KaiVolland/updates
Browse files Browse the repository at this point in the history
Updates packages and CI
  • Loading branch information
KaiVolland authored Sep 14, 2021
2 parents 7fd446e + 32aefb8 commit 6db240d
Show file tree
Hide file tree
Showing 8 changed files with 3,013 additions and 22,456 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/on-pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Test Pull Request

on: pull_request

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [12.x, 14.x, 16.x]

steps:
- name: Checkout sources
uses: actions/checkout@v2

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}

- name: Cache Node.js modules 💾
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.OS }}-node-
${{ runner.OS }}-
- name: Install dependencies ⏬
run: npm install

- name: Lint code 💄
run: npm run lint

- name: Typecheck code 🤖
run: npm run typecheck

- name: Test code ✅
run: npm run test

- name: Build artifacts 🏗️
run: npm run build

- name: Publish to coveralls ⭐
# coverage/lcov.info was generated in the previous npm run build step
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
53 changes: 53 additions & 0 deletions .github/workflows/on-push-master.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Test Push to Master

on:
push:
branches:
- master

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [12.x, 14.x, 16.x]

steps:
- name: Checkout sources
uses: actions/checkout@v2

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}

- name: Cache Node.js modules 💾
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.OS }}-node-
${{ runner.OS }}-
- name: Install dependencies ⏬
run: npm install

- name: Lint code 💄
run: npm run lint

- name: Typecheck code 🤖
run: npm run typecheck

- name: Test code ✅
run: npm run test

- name: Build artifacts 🏗️
run: npm run build

- name: Publish to coveralls ⭐
# coverage/lcov.info was generated in the previous npm run build step
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
13 changes: 0 additions & 13 deletions .travis.yml

This file was deleted.

3 changes: 2 additions & 1 deletion browser-build.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ module.exports = {
output: {
filename: "olStyleParser.js",
path: __dirname + "/browser",
library: "GeoStylerOpenlayersParser"
library: "GeoStylerOpenlayersParser",
chunkFormat: "array-push"
},
resolve: {
extensions: [".ts", ".js", ".json"]
Expand Down
25 changes: 13 additions & 12 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
module.exports = {
"moduleFileExtensions": [
"ts",
"js"
'testEnvironment': 'jsdom',
'moduleFileExtensions': [
'ts',
'js'
],
"setupFilesAfterEnv": [
"jest-canvas-mock"
'setupFilesAfterEnv': [
'jest-canvas-mock'
],
"transform": {
"^.+\\.(ts|js)$": "<rootDir>/node_modules/babel-jest"
'transform': {
'^.+\\.(ts|js)$': '<rootDir>/node_modules/babel-jest'
},
"transformIgnorePatterns": [
"node_modules/(?!(ol|@terrestris/*)/)"
'transformIgnorePatterns': [
'node_modules/(?!(ol|@terrestris/*)/)'
],
"testRegex": "/src/.*\\.spec.ts$",
"collectCoverageFrom": [
"src/*.ts"
'testRegex': '/src/.*\\.spec.ts$',
'collectCoverageFrom': [
'src/*.ts'
]
};
Loading

0 comments on commit 6db240d

Please sign in to comment.