fix: usage docs in README #122
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: ci | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| ci: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest] | |
| node: [14] | |
| steps: | |
| - uses: actions/setup-node@v1 | |
| with: | |
| node-version: ${{ matrix.node }} | |
| - name: checkout | |
| uses: actions/checkout@v2 | |
| with: | |
| ref: ${{ github.event.pull_request.head.sha }} | |
| - name: Get yarn cache directory path | |
| id: yarn-cache-dir-path | |
| run: echo "::set-output name=dir::$(yarn cache dir)" | |
| - uses: actions/cache@v2 | |
| id: yarn-cache | |
| with: | |
| path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | |
| key: ${{ matrix.os }}-node-v${{ matrix.node }}-deps-${{ hashFiles('**/yarn.lock') }} | |
| restore-keys: | | |
| ${{ matrix.os }}-yarn- | |
| - name: Install dependencies | |
| run: yarn | |
| - name: Lint | |
| run: yarn lint | |
| - name: Test | |
| run: yarn test | |
| - name: Report test coverage results to DeepSource | |
| run: | | |
| # Install deepsource CLI | |
| curl https://deepsource.io/cli | sh | |
| # From the root directory, run the report coverage command | |
| ./bin/deepsource report --analyzer test-coverage --key javascript --value-file ./coverage/cobertura-coverage.xml | |
| env: | |
| DEEPSOURCE_DSN: ${{ secrets.DEEPSOURCE_DSN }} |