Skip to content

Commit

Permalink
Merge pull request #7 from theiconic/feature/ci-test-runs
Browse files Browse the repository at this point in the history
Add github action workflow for ci testing
  • Loading branch information
wyrfel authored Aug 7, 2020
2 parents 045fea5 + 7374342 commit 2887f47
Show file tree
Hide file tree
Showing 5 changed files with 99 additions and 26 deletions.
21 changes: 0 additions & 21 deletions .github/workflows/main.yml

This file was deleted.

19 changes: 19 additions & 0 deletions .github/workflows/plantuml.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: generate plantuml
on:
push:
branches:
- master
jobs:
generate_plantuml:
runs-on: ubuntu-latest
name: plantuml
steps:
- name: checkout
uses: actions/checkout@v2
- name: plantuml
id: plantuml
uses: grassedge/generate-plantuml-action@master
with:
path: example
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
33 changes: 33 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: run tests
on: push
jobs:
tests:
runs-on: ubuntu-latest
name: tests
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
steps:
- name: checkout
uses: actions/checkout@v2
- name: install node
uses: actions/setup-node@v1
with:
node-version: 12.x
- name: install depedencies
run: npm install
- name: run tests
run: "npm run test:ci"
env:
CI: true
- name: report test results
uses: IgnusG/[email protected]
if: always()
with:
access-token: ${{ secrets.GITHUB_TOKEN }}
check-name: Unit Tests
- name: CodeClimate coverage report
uses: aktions/codeclimate-test-reporter@v1
if: ${{ env.CC_TEST_REPORTER_ID != '' }}
with:
codeclimate-test-reporter-id: ${{ secrets.CC_TEST_REPORTER_ID }}
command: after-build
41 changes: 38 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 9 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"scripts": {
"build": "tsc",
"package": "ncc build lib/main.js",
"test": "jest"
"test": "jest",
"test:ci": "jest --ci --coverage --reporters=default --reporters=jest-junit"
},
"repository": {
"type": "git",
Expand Down Expand Up @@ -35,7 +36,13 @@
"@zeit/ncc": "^0.20.5",
"jest": "^26.2.2",
"jest-circus": "^26.2.2",
"jest-junit": "^11.1.0",
"ts-jest": "^26.1.4",
"typescript": "^3.5.1"
"typescript": "^3.9.7"
},
"jest-junit": {
"suiteNameTemplate": "{filepath}",
"classNameTemplate": "{classname}",
"titleTemplate": "{title}"
}
}

0 comments on commit 2887f47

Please sign in to comment.