mirror of
https://github.com/discordeno/discordeno.git
synced 2026-05-29 15:00:07 +00:00
* 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
55 lines
1.8 KiB
YAML
55 lines
1.8 KiB
YAML
name: E2E Test
|
|
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
package:
|
|
required: true
|
|
type: string
|
|
|
|
jobs:
|
|
e2e-test:
|
|
name: E2E Test
|
|
runs-on: ubuntu-latest
|
|
concurrency: e2e-test
|
|
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:e2e-${{ 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: E2E Test
|
|
run: yarn test:e2e --cache-dir=".turbo" --filter=./packages/${{ inputs.package }}
|
|
timeout-minutes: 5
|
|
env:
|
|
DISCORD_TOKEN: ${{ secrets.DISCORD_TOKEN }}
|
|
E2E_TEST_GUILD_ID: ${{ secrets.UNIT_TEST_GUILD_ID }}
|
|
PROXY_REST_SECRET: ${{ secrets.PROXY_REST_SECRET }}
|
|
PROXY_REST_URL: ${{ secrets.PROXY_REST_URL }}
|
|
- name: Collect and upload the coverage report
|
|
uses: codecov/codecov-action@v3
|
|
with:
|
|
files: ./packages/${{ inputs.package }}/coverage/lcov.info
|
|
flags: ${{ inputs.package }}-e2e,${{ inputs.package }}
|