diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..0cc75ef --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,35 @@ +name: Node.js CI + +on: + push: + branches: main + pull_request: + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: 16.x + - name: Install dependencies + run: npm ci + - name: Run ESLint + run: npm run lint + test: + runs-on: ubuntu-latest + strategy: + matrix: + node-version: [16.x] + fail-fast: false + steps: + - uses: actions/checkout@v2 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v2 + with: + node-version: ${{ matrix.node-version }} + - name: Install dependencies + run: npm ci + - name: Run tests + run: npm run test \ No newline at end of file diff --git a/package.json b/package.json index 90690b7..3519340 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "scripts": { "start": "node index.js", "lint": "eslint index.js", - "test": "cross-env esm-tape-runner 'test/**/*.test.js' | tap-monkey", + "test": "cross-env esm-tape-runner 'tests/**/*.test.js' | tap-monkey", "coverage": "c8 -r html npm test" }, "repository": {