mirror of
https://github.com/discordeno/discordeno.git
synced 2026-05-31 16:00:07 +00:00
* build(deps): bump codecov/codecov-action from 3 to 4 Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 3 to 4. - [Release notes](https://github.com/codecov/codecov-action/releases) - [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/codecov/codecov-action/compare/v3...v4) --- updated-dependencies: - dependency-name: codecov/codecov-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * chore: remove temp fix --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: H01001000 <heiheiho000@gmail.com>
49 lines
1.5 KiB
YAML
49 lines
1.5 KiB
YAML
name: Package Test
|
|
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
package:
|
|
required: true
|
|
type: string
|
|
|
|
jobs:
|
|
unit-test:
|
|
name: Unit Test
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-node@v4
|
|
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:unit-${{ 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: Unit Test
|
|
run: yarn test:unit --cache-dir=".turbo" --filter=./packages/${{ inputs.package }}
|
|
timeout-minutes: 1
|
|
- name: Collect and upload the coverage report
|
|
uses: codecov/codecov-action@v4
|
|
with:
|
|
files: ./packages/${{ inputs.package }}/coverage/lcov.info
|
|
flags: ${{ inputs.package }}-unit,${{ inputs.package }}
|