Files
discordeno/.github/workflows/integration-test.yml
Jonathan Ho f6bd769235 chore: update readme (#2772)
* chore: add coverage per pkg

* chore: add npm version

* chore: add test status

* chore: fix ci

* chore: fix ci

* ci: fix ci needs

* chore: add only push event

* style: remove import logger
2023-02-08 08:53:23 -06:00

49 lines
1.5 KiB
YAML

name: Package Test
on:
workflow_call:
inputs:
package:
required: true
type: string
jobs:
integration-test:
name: Integration Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- run: yarn install --immutable
- name: Turbo Cache
id: turbo-cache
uses: actions/cache@v3
with:
path: .turbo
key: ${{ runner.os }}-turbo-test:integration-${{ inputs.package }}-${{ github.sha }}
- name: Build dist cache
if: steps.turbo-cache.outputs.cache-hit != 'true'
uses: actions/cache@v3
with:
path: .turbo
key: ${{ runner.os }}-turbo-build-${{ github.sha }}
- name: Integration Test
run: yarn test:integration --cache-dir=".turbo" --filter=./packages/${{ inputs.package }}
timeout-minutes: 1
- name: Collect and upload the coverage report
uses: codecov/codecov-action@v3
with:
files: ./packages/${{ inputs.package }}/coverage/lcov.info
flags: ${{ inputs.package }}-integration,${{ inputs.package }}