diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 000000000000..1be9fde0e338 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,106 @@ +name: CI + +on: + push: + branches: + - master + pull_request: + branches: + - '**' + +jobs: + primary_code_validation_and_tests: + name: Primary code validation and tests + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Use Node.js 12 + uses: actions/setup-node@v1 + with: + node-version: 12 + + # This also runs a build as part of the postinstall bootstrap + - name: install and build + run: | + yarn --ignore-engines --frozen-lockfile + yarn check-clean-workspace-after-install + + # Note that this command *also* typechecks tests/tools, + # whereas the build only checks src files + - name: Typecheck all packages + run: yarn typecheck + + - name: Check code formatting + run: yarn format-check + + - name: Run linting + run: yarn lint + + - name: Validate spelling + run: yarn check:spelling + + - name: Run unit tests + run: yarn test + env: + CI: true + + - name: Run integrations tests + run: yarn integration-tests + env: + CI: true + + - name: Publish code coverage report + uses: codecov/codecov-action@v1 + with: + yml: ./codecov.yml + token: ${{ secrets.CODECOV_TOKEN }} + flags: unittest + name: codecov + + unit_tests_on_other_node_versions: + name: Run unit tests on other Node.js versions + runs-on: ubuntu-latest + strategy: + matrix: + node-version: [8.x, 10.x] + steps: + - uses: actions/checkout@v2 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + + # This also runs a build as part of the postinstall bootstrap + - name: install and build + run: | + yarn --ignore-engines --frozen-lockfile + yarn check-clean-workspace-after-install + + - name: Run unit tests + run: yarn test + env: + CI: true + + publish_canary_version: + name: Publish the latest code as a canary version + runs-on: ubuntu-latest + needs: [primary_code_validation_and_tests, unit_tests_on_other_node_versions] + if: github.event_name == 'push' && github.ref == 'refs/head/master' + steps: + - uses: actions/checkout@v1 + - name: Use Node.js 12 + uses: actions/setup-node@v1 + with: + node-version: 12 + registry-url: https://registry.npmjs.org/ + + # This also runs a build as part of the postinstall bootstrap + - name: install and build + run: | + yarn --ignore-engines --frozen-lockfile + yarn check-clean-workspace-after-install + +# - name: Publish all packages to npm +# run: npx lerna publish --canary --exact --force-publish --yes +# env: +# NODE_AUTH_TOKEN: ${{ secrets.npm_token }} diff --git a/README.md b/README.md index c23634df344c..95cfe76c5eb4 100644 --- a/README.md +++ b/README.md @@ -3,8 +3,8 @@
Monorepo for all the tooling which enables ESLint to support TypeScript