diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..8a72806 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,25 @@ +name: Build + +on: + push: + branches: [$default-branch] + pull_request: + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + node-version: [18.x, 20.x] + steps: + - uses: actions/checkout@v3 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + cache: 'yarn' + - run: yarn install --frozen-lockfile + - run: yarn build + - run: yarn lint + - run: yarn format + - run: yarn test diff --git a/package.json b/package.json index 9e47e91..9d41040 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ "dist" ], "scripts": { - "build": "yarn build:types && yarn build:grammar && yarn build:rollup", + "build": "yarn build:grammar && yarn build:types && yarn build:rollup", "build:types": "tsc --project tsconfig.build.json", "build:grammar": "antlr4ts -visitor src/grammar/*.g4", "build:rollup": "cross-env NODE_ENV=production rollup -c", @@ -31,7 +31,7 @@ "lint:fix": "yarn lint src --fix", "format": "prettier . --check", "format:fix": "prettier . --write", - "test": "cross-env NODE_ENV=test jest", + "test": "cross-env NODE_ENV=test TZ=UTC jest", "prepare": "husky install", "prepublishOnly": "yarn clean && yarn lint && yarn format && yarn test && yarn build" }, diff --git a/src/networks/ignition/parseHand.test.ts b/src/networks/ignition/parseHand.test.ts index cfbd63c..900a645 100644 --- a/src/networks/ignition/parseHand.test.ts +++ b/src/networks/ignition/parseHand.test.ts @@ -207,7 +207,7 @@ describe('parseHand', () => { "isFastFold": false, "site": "bovada", "tableSize": 6, - "timestamp": 2022-05-26T14:16:24.000Z, + "timestamp": 2022-05-26T09:16:24.000Z, "variant": "holdem", }, "players": [ @@ -411,7 +411,7 @@ describe('parseHand', () => { "isFastFold": false, "site": "bovada", "tableSize": 6, - "timestamp": 2022-05-26T14:17:19.000Z, + "timestamp": 2022-05-26T09:17:19.000Z, "variant": "holdem", }, "players": [ @@ -601,7 +601,7 @@ describe('parseHand', () => { "isFastFold": false, "site": "bovada", "tableSize": 6, - "timestamp": 2022-05-26T14:19:56.000Z, + "timestamp": 2022-05-26T09:19:56.000Z, "variant": "holdem", }, "players": [ @@ -766,7 +766,7 @@ describe('parseHand', () => { "isFastFold": false, "site": "bovada", "tableSize": 6, - "timestamp": 2022-05-26T14:44:06.000Z, + "timestamp": 2022-05-26T09:44:06.000Z, "variant": "holdem", }, "players": [ @@ -1051,7 +1051,7 @@ describe('parseHand', () => { "isFastFold": false, "site": "bovada", "tableSize": 6, - "timestamp": 2022-05-26T19:39:38.000Z, + "timestamp": 2022-05-26T14:39:38.000Z, "variant": "holdem", }, "players": [ @@ -1274,7 +1274,7 @@ describe('parseHand', () => { "isFastFold": false, "site": "bovada", "tableSize": 6, - "timestamp": 2022-05-26T15:17:34.000Z, + "timestamp": 2022-05-26T10:17:34.000Z, "variant": "holdem", }, "players": [ @@ -1491,7 +1491,7 @@ describe('parseHand', () => { "isFastFold": false, "site": "bovada", "tableSize": 6, - "timestamp": 2022-05-26T18:12:06.000Z, + "timestamp": 2022-05-26T13:12:06.000Z, "variant": "holdem", }, "players": [ @@ -1688,7 +1688,7 @@ describe('parseHand', () => { "isFastFold": false, "site": "bovada", "tableSize": 6, - "timestamp": 2022-05-30T18:23:41.000Z, + "timestamp": 2022-05-30T13:23:41.000Z, "variant": "holdem", }, "players": [ @@ -1914,7 +1914,7 @@ describe('parseHand', () => { "isFastFold": false, "site": "bovada", "tableSize": 6, - "timestamp": 2022-06-02T23:58:50.000Z, + "timestamp": 2022-06-02T18:58:50.000Z, "variant": "omaha", }, "players": [ @@ -2140,7 +2140,7 @@ describe('parseHand', () => { "isFastFold": false, "site": "bovada", "tableSize": 6, - "timestamp": 2022-06-10T17:42:20.000Z, + "timestamp": 2022-06-10T12:42:20.000Z, "variant": "omaha", }, "players": [ @@ -2352,7 +2352,7 @@ describe('parseHand', () => { "isFastFold": true, "site": "bovada", "tableSize": 6, - "timestamp": 2022-12-06T01:22:58.000Z, + "timestamp": 2022-12-05T19:22:58.000Z, "variant": "holdem", }, "players": [ @@ -2602,7 +2602,7 @@ describe('parseHand', () => { "isFastFold": true, "site": "bovada", "tableSize": 6, - "timestamp": 2023-08-23T06:00:26.000Z, + "timestamp": 2023-08-23T01:00:26.000Z, "variant": "holdem", }, "players": [ @@ -2823,7 +2823,7 @@ describe('parseHand', () => { "isFastFold": false, "site": "bovada", "tableSize": 6, - "timestamp": 2022-05-26T15:23:28.000Z, + "timestamp": 2022-05-26T10:23:28.000Z, "variant": "holdem", }, "players": [ @@ -2973,7 +2973,7 @@ describe('parseHand', () => { "isFastFold": true, "site": "ignition", "tableSize": 6, - "timestamp": 2018-03-13T12:37:42.000Z, + "timestamp": 2018-03-13T07:37:42.000Z, "variant": "holdem", }, "players": [ @@ -3138,7 +3138,7 @@ describe('parseHand', () => { "isFastFold": true, "site": "bodog", "tableSize": 6, - "timestamp": 2019-09-09T21:16:05.000Z, + "timestamp": 2019-09-09T16:16:05.000Z, "variant": "holdem", }, "players": [