diff --git a/.github/workflows/test-fork.yml b/.github/workflows/test-fork.yml new file mode 100644 index 0000000..07ce8ca --- /dev/null +++ b/.github/workflows/test-fork.yml @@ -0,0 +1,47 @@ +name: Tests (Fork PRs) +run-name: Unit Tests + +on: + pull_request: + branches: + - master + paths: + - '*' + - 'package*.json' + - 'src/**' + - 'tests/**' + - '!docs/**' + - '!imgs/**' + - '!.github/**' + - '.github/workflows/**' + - '!.gitignore' + - '!LICENSE' + - '!README' + +jobs: + Discord-Node-Test-Fork: + if: ${{ github.event.pull_request.head.repo.fork == true }} + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-node@v4 + with: + node-version: 'lts/jod' + cache: npm + + - name: Install Project Dependencies + run: | + npm install + + - name: Create Dummy Env + run: | + echo CLIENT_TOKEN=test-token >> .env + echo LLM_ENDPOINT=127.0.0.1 >> .env + echo LLM_PORT=11434 >> .env + echo MODEL=dummy-model >> .env + + - name: Test Application + run: | + npm run tests diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 438f375..5c057a0 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -20,6 +20,7 @@ on: jobs: Discord-Node-Test: + if: ${{ github.event.pull_request.head.repo.fork == false }} runs-on: ubuntu-latest timeout-minutes: 2