diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 535e4b7..b2ebd71 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -7,7 +7,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - node: ['10.x', '12.x', '14.x'] + node: ['12.x', '14.x'] os: [ubuntu-latest, windows-latest, macOS-latest] steps: @@ -19,14 +19,22 @@ jobs: with: node-version: ${{ matrix.node }} - - name: Install deps and build (with cache) - uses: bahmutov/npm-install@v1 + - name: Run install + uses: borales/actions-yarn@v4 + with: + cmd: install # will run `yarn install` command - name: Lint - run: yarn lint + uses: borales/actions-yarn@v4 + with: + cmd: lint # will run `yarn lint` command - name: Test - run: yarn test --ci --coverage --maxWorkers=2 + uses: borales/actions-yarn@v4 + with: + cmd: test --ci --coverage --maxWorkers=2 # will run `yarn test --ci --coverage --maxWorkers=2` command - name: Build - run: yarn build + uses: borales/actions-yarn@v4 + with: + cmd: build # will run `yarn build` command diff --git a/test/blah.test.ts b/test/blah.test.ts deleted file mode 100644 index 33c7ef5..0000000 --- a/test/blah.test.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { sum } from '../src'; - -describe('blah', () => { - it('works', () => { - expect(sum(1, 1)).toEqual(2); - }); -}); diff --git a/test/getRandomUsername.test.ts b/test/getRandomUsername.test.ts new file mode 100644 index 0000000..4532e65 --- /dev/null +++ b/test/getRandomUsername.test.ts @@ -0,0 +1,7 @@ +import { getRandomUsername } from '../src'; + +describe('getRandomUsername', () => { + it('get a string', () => { + expect(typeof getRandomUsername()).toBe('string'); + }); +});