diff --git a/.github/workflows/test.yml b/.github/workflows/test-branches.yml similarity index 94% rename from .github/workflows/test.yml rename to .github/workflows/test-branches.yml index 5d3049862..6e7ee8ae2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test-branches.yml @@ -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 diff --git a/.github/workflows/test-pulls.yml b/.github/workflows/test-pulls.yml new file mode 100644 index 000000000..5bf8b4d93 --- /dev/null +++ b/.github/workflows/test-pulls.yml @@ -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 diff --git a/README.md b/README.md new file mode 100644 index 000000000..78314c3c3 --- /dev/null +++ b/README.md @@ -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)