Skip to content

Commit

Permalink
Merge pull request #1 from CartoDB/test/vercel
Browse files Browse the repository at this point in the history
Add github actions for CI
  • Loading branch information
VictorVelarde authored Jun 8, 2020
2 parents 0b1f249 + 9b1ac88 commit 1b5ad4b
Show file tree
Hide file tree
Showing 6 changed files with 46 additions and 3 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: CI

on: [push]

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [12.x]

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm run lint
- run: npm run build --if-present
- run: npm test
env:
CI: true
11 changes: 11 additions & 0 deletions examples/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Examples</title>
</head>
<body>
<h1>web-sdk examples</h1>
</body>
</html>
3 changes: 2 additions & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
module.exports = {
preset: 'ts-jest',
modulePathIgnorePatterns: ['__tests__/.*/cases/']
modulePathIgnorePatterns: ['__tests__/.*/cases/'],
rootDir: './src'
};
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"build:umd": "webpack --config webpack.config.js",
"build:watch": "webpack --config webpack.config.js --watch ",
"prewatch": "rimraf dist/",
"test": "jest",
"test": "jest --config jest.config.js",
"test:watch": "jest --watch"
},
"devDependencies": {
Expand Down
3 changes: 3 additions & 0 deletions src/__tests__/test.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
test('adds 1 + 2 to equal 3', () => {
expect(1 + 2).toBe(3);
});
3 changes: 2 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export const websdk = "A";
type aaa = string | number;
export const websdk: aaa = 'A';

1 comment on commit 1b5ad4b

@vercel
Copy link

@vercel vercel bot commented on 1b5ad4b Jun 8, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.