ci: separate local tests

This commit is contained in:
ayntee
2021-01-27 11:45:19 +04:00
parent 3496aa15b0
commit 07bf620ffa
2 changed files with 6 additions and 3 deletions

View File

@@ -13,8 +13,10 @@ jobs:
deno-version: ${{ matrix.deno }}
- name: Cache dependencies
run: deno cache mod.ts
- name: Run test script
- name: Run local tests
run: TEST_TYPE=local deno test
- name: Run API tests
if: github.ref == 'refs/heads/master'
run: deno test --allow-net --allow-env
run: TEST_TYPE=api deno test --allow-net --allow-env
env:
DISCORD_TOKEN: ${{ secrets.DISCORD_TOKEN }}

View File

@@ -40,9 +40,10 @@ startBot({
});
// Default options for tests
export const defaultTestOptions = {
export const defaultTestOptions: Partial<Deno.TestDefinition> = {
sanitizeOps: false,
sanitizeResources: false,
ignore: Deno.env.get("TEST_TYPE") !== "api",
};
// Temporary data