chore: update github actions config, add CI badges to readme

This commit is contained in:
Sam Tolmay 2020-11-20 14:47:59 +02:00
parent 8b0cef4ed8
commit 33019c4a1e
3 changed files with 48 additions and 3 deletions

View File

@ -1,7 +1,6 @@
name: Test
name: Test Branches
on:
pull_request:
push:
branches:
- main
@ -23,7 +22,7 @@ jobs:
run: yarn install --immutable --immutable-cache --check-cache
- name: Build packages
run: yarn build
# format tests don't pass on node 12 since icu is missing and tests don't work with locals
# format tests don't pass on node 12 since icu is missing and tests don't work with locales
- name: Test packages
run: yarn test --ignore='@lowdefy/format'
- name: Upload coverage to codecov

39
.github/workflows/test-pulls.yml vendored Normal file
View File

@ -0,0 +1,39 @@
name: Test Pull Requests
on:
pull_request:
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Setup Node
uses: actions/setup-node@v1
with:
node-version: '12.x'
- uses: actions/checkout@v2
with:
# needed for yarn version check, checks out entire repo
fetch-depth: 0
- name: Check yarn cache integrity
run: yarn install --immutable --immutable-cache
- name: Build packages
run: yarn build
# Make tests fail faster
- name: Test changes since develop
run: yarn test --ignore='@lowdefy/format' --changedSince=develop
# format tests don't pass on node 12 since icu is missing and tests don't work with locales
- name: Test packages
run: yarn test --ignore='@lowdefy/format'
- name: Upload coverage to codecov
run: bash <(curl -s https://codecov.io/bash)
- name: Upload coverage to codeclimate
uses: paambaati/codeclimate-action@v2.7.4
env:
CC_TEST_REPORTER_ID: ${{secrets.CC_TEST_REPORTER_ID}}
with:
coverageLocations: |
${{github.workspace}}/packages/*/coverage/lcov.info:lcov

7
README.md Normal file
View File

@ -0,0 +1,7 @@
### Lowdefy
![Tests Main](https://github.com/lowdefy/lowdefy/workflows/Test%20Branches/badge.svg?branch=main)
![Tests Develop](https://github.com/lowdefy/lowdefy/workflows/Test%20Branches/badge.svg?branch=develop)
[![Maintainability](https://api.codeclimate.com/v1/badges/6efe9bfa0648772cae00/maintainability)](https://codeclimate.com/github/lowdefy/lowdefy/maintainability)
[![Test Coverage](https://api.codeclimate.com/v1/badges/6efe9bfa0648772cae00/test_coverage)](https://codeclimate.com/github/lowdefy/lowdefy/test_coverage)
[![Codecov](https://codecov.io/gh/lowdefy/lowdefy/branch/main/graph/badge.svg?token=U2AEEH9K1W)](https://codecov.io/gh/lowdefy/lowdefy)