diff options
Diffstat (limited to '.github/workflows')
| -rw-r--r-- | .github/workflows/cd.yml | 51 | ||||
| -rw-r--r-- | .github/workflows/ci.yml | 83 |
2 files changed, 134 insertions, 0 deletions
diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml new file mode 100644 index 0000000..95785ab --- /dev/null +++ b/.github/workflows/cd.yml @@ -0,0 +1,51 @@ +name: CD + +on: + push: + branches: + - master + pull_request: + branches: + - master + release: + types: + - created + +jobs: + release: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Use Node.js + uses: actions/setup-node@v1 + with: + node-version: '15.11.0' + - run: yarn + + - name: Install VSCE + run: yarn add vsce -D + + - name: Update $PATH + run: echo "$PWD/node_modules/.bin/" >> $GITHUB_PATH + + - name: Build vsix + run: vsce package && ls -alh + + - name: Deploy to Marketplace + run: vsce publish -p ${VSCE_TOKEN} + env: + VSCE_TOKEN: ${{ secrets.VSCE_TOKEN }} + if: contains(github.ref, 'refs/tags/') + + - name: Upload vsix to GitHub release + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: doxdocgen-*.vsix + tag: ${{ github.ref }} + overwrite: true + file_glob: true + if: contains(github.ref, 'refs/tags/') + diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..6cf725f --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,83 @@ +name: CI + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + lint: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Use Node.js + uses: actions/setup-node@v1 + with: + node-version: '15.11.0' + - run: yarn + + - name: Lint + run: yarn lint + + build: + needs: lint + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, macos-latest, windows-latest] + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Use Node.js + uses: actions/setup-node@v1 + with: + node-version: '15.11.0' + - run: yarn + + - name: Compile + run: yarn compile + + test: + needs: build + runs-on: ${{ matrix.os }} + strategy: + matrix: + # disable ubuntu-latest until https://github.com/microsoft/vscode/issues/106569 is fixed + os: [macos-latest, windows-latest] + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Use Node.js + uses: actions/setup-node@v1 + with: + node-version: '15.11.0' + - run: yarn + + - name: Test + run: yarn test + # Run tests only on non-coverage job + if: matrix.os != 'macOS-latest' + + - name: Generate Coverage + run: yarn cov + if: matrix.os == 'macOS-latest' + + - name: Publish coverage + uses: codecov/codecov-action@v1 + with: + token: ${{ secrets.CODECOV_TOKEN }} + if: matrix.os == 'macOS-latest' + + - name: Upload coverage + uses: actions/upload-artifact@v2 + with: + name: cov + path: coverage + if: matrix.os == 'macOS-latest' + |