diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..a39c1b2 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,20 @@ +name: main +on: + - pull_request + - push +jobs: + main: + name: ${{matrix.node}} + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: ${{matrix.node}} + - run: npm install + - run: npm test + strategy: + matrix: + node: + - lts/iron + - node \ No newline at end of file diff --git a/README.md b/README.md index 9b82425..ed8cfdd 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,6 @@ ## TODO -- github actions - test coverage - more tests? - typescript coverage diff --git a/package.json b/package.json index cd47fea..3b9b72a 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,9 @@ "scripts": { "build": "micromark-build", "format": "prettier . -w --log-level warn && xo --fix", - "test": "node --test" + "test-dev": "node --conditions development --test", + "test-prod": "node --conditions production --test", + "test": "npm run test-dev && npm run test-prod" }, "prettier": { "bracketSpacing": false,