From 6d6b512a8c78ef10a94bca7a4a74b9ac750da433 Mon Sep 17 00:00:00 2001 From: ~PV Date: Fri, 28 Jul 2023 22:58:46 +0000 Subject: [PATCH] Test CI action --- .github/workflows/test.yml | 24 ++++++++++++++++++++++++ src/__tests__/index.js | 2 +- 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..05c2d4b --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,24 @@ +name: 'test' + +on: + push: + pull_request: + types: [opened, synchronize] + +jobs: + test: + permissions: + contents: write + strategy: + fail-fast: false + + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v3 + - name: setup node + uses: actions/setup-node@v3 + with: + node-version: 18 + - run: npm ci + - run: npm run build --if-present + - run: npm test diff --git a/src/__tests__/index.js b/src/__tests__/index.js index e54fffa..518e177 100644 --- a/src/__tests__/index.js +++ b/src/__tests__/index.js @@ -10,7 +10,7 @@ describe('40k', () => { let gameData beforeAll(async () => { gameData = await readFiles(path.join(__dirname, 'downloadedGameSystems/wh40k'), fs) - }) + }, 60000) const rosters = { '12AvatarKhaine.ros': {