diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4cba0d6..0afa473 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,15 +16,35 @@ on: - '*.md' jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Use Node.js + uses: actions/setup-node@v3 + with: + node-version: lts/* + - name: Install + run: | + npm install + - name: Install PeerDeps + run: | + npm i fastify json-schema-to-ts + + - name: Run lint + run: | + npm run lint test: + name: Test on Node.js ${{ matrix.node-version }} and ${{ matrix.os }} runs-on: ${{ matrix.os }} strategy: matrix: - node-version: [12, 14, 16, 17] + node-version: [14, 16, 18, 20] os: [macos-latest, ubuntu-latest, windows-latest] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Use Node.js uses: actions/setup-node@v3 @@ -39,10 +59,53 @@ jobs: run: | npm i fastify json-schema-to-ts - - name: Run lint + - name: Run Transpile run: | - npm run lint + npm run build - - name: Run tests + types: + name: Types + runs-on: 'ubuntu-latest' + + steps: + - uses: actions/checkout@v4 + + - name: Use Node.js + uses: actions/setup-node@v3 + with: + node-version: lts/* + + - name: Install + run: | + npm install + + - name: Install PeerDeps run: | - npm run test + npm i fastify json-schema-to-ts + + - name: Transpile + run: | + npm run build + + - name: Test types + run: | + npm run typescript + + automerge: + name: Automerge Dependabot PRs + if: > + github.event_name == 'pull_request' && + github.event.pull_request.user.login == 'dependabot[bot]' + needs: + - lint + - test + - types + permissions: + pull-requests: write + contents: write + runs-on: ubuntu-latest + steps: + - uses: fastify/github-action-merge-dependabot@v3 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + target: major diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000..43c97e7 --- /dev/null +++ b/.npmrc @@ -0,0 +1 @@ +package-lock=false