diff --git a/.github/workflows/dev-test.yml b/.github/workflows/dev-test.yml new file mode 100644 index 000000000..aab873803 --- /dev/null +++ b/.github/workflows/dev-test.yml @@ -0,0 +1,36 @@ +name: Dev_Test + +on: [pull_request] + +jobs: + dev_test: + strategy: + fail-fast: false + matrix: + os: + - "ubuntu-latest" + - "macos-latest" + - "windows-latest" + node: + - "13" + - "12" + - "10" + + name: Dev test on node ${{ matrix.node }} and ${{ matrix.os }} + runs-on: ${{ matrix.os }} + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 1 + + - name: Setup Node.js + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.NODE }} + + - name: Install Dependencies + run: yarn install --frozen-lockfile + + - name: Run Test + run: yarn test diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 000000000..6fd4095e7 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,40 @@ +name: Lint + +on: [pull_request] + +jobs: + lint: + name: Lint + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 1 + + - name: Setup Node.js + uses: actions/setup-node@v1 + with: + node-version: "12" + + - name: Install Dependencies + run: yarn install --frozen-lockfile + + - name: Check dependencies + run: yarn check-deps + + - name: Check JSDoc types + run: yarn check-types + + - name: Lint code + run: yarn lint + + - name: Lint docs + run: yarn lint-docs + + - name: Spellcheck + run: yarn spellcheck + + - name: Check file changes + run: yarn && echo "Listing changed files:" && git diff --name-only --exit-code && echo "No files changed during lint." + diff --git a/.github/workflows/prod-test.yml b/.github/workflows/prod-test.yml new file mode 100644 index 000000000..ac2c3bc5f --- /dev/null +++ b/.github/workflows/prod-test.yml @@ -0,0 +1,69 @@ +name: Prod_Test + +on: [pull_request] + +jobs: + build: + name: Build + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 1 + + - name: Setup Node.js + uses: actions/setup-node@v1 + with: + node-version: "12" + + - name: Install Dependencies + run: yarn install --frozen-lockfile + + - name: Build Package + run: yarn build + + - name: Upload Artifact + uses: actions/upload-artifact@v1 + with: + name: dist + path: dist + + prod_test: + strategy: + fail-fast: false + matrix: + os: + - "ubuntu-latest" + - "macos-latest" + - "windows-latest" + node: + - "13" + - "12" + - "10" + + name: Prod test on node ${{ matrix.node }} and ${{ matrix.os }} + runs-on: ${{ matrix.os }} + needs: [build] + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 1 + + - name: Setup Node.js + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node }} + + - name: Install Dependencies + run: yarn install --frozen-lockfile + + - name: Download Artifact + uses: actions/download-artifact@v1 + with: + name: dist + path: dist + + - name: Run Test + run: yarn test:dist diff --git a/README.md b/README.md index 2c27da720..a6a129de2 100644 --- a/README.md +++ b/README.md @@ -45,6 +45,8 @@ This is the branch containing code for Prettier’s 2.0 release. See [the `maste

Azure Pipelines Build Status + + Github Actions Build Status Codecov Coverage Status