From 05418212b479e6a5940e3f30b329f4a59213c382 Mon Sep 17 00:00:00 2001 From: Yan Xu Date: Tue, 19 Nov 2024 11:32:38 +0800 Subject: [PATCH 1/3] Create pr-check.yml --- .github/workflows/pr-check.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/pr-check.yml diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml new file mode 100644 index 0000000..d5e180d --- /dev/null +++ b/.github/workflows/pr-check.yml @@ -0,0 +1,29 @@ +name: pr-check + +on: + push: + pull_request: + branches: + - main +jobs: + pr-check: + runs-on: ubuntu-latest + steps: + - name: Checkout from PR branch + uses: actions/checkout@v4 + + - name: Set Node.js 14.x for GitHub Action + uses: actions/setup-node@v4 + with: + node-version: 14.x + + - name: installing node_modules + run: | + pushd vscode-extension + npm install + npm run lint + npm run compile + if [ $? -ne 0 ]; then + exit 1 + fi + popd From 2098d5015c3317d0e1a7e50782dd335985591efd Mon Sep 17 00:00:00 2001 From: Yan Xu Date: Tue, 19 Nov 2024 12:14:19 +0800 Subject: [PATCH 2/3] Update pr-check.yml --- .github/workflows/pr-check.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml index d5e180d..e984298 100644 --- a/.github/workflows/pr-check.yml +++ b/.github/workflows/pr-check.yml @@ -9,16 +9,18 @@ jobs: pr-check: runs-on: ubuntu-latest steps: - - name: Checkout from PR branch + - name: Checkout uses: actions/checkout@v4 - - name: Set Node.js 14.x for GitHub Action + - name: Install Node.js 14 uses: actions/setup-node@v4 with: node-version: 14.x - - name: installing node_modules + - name: Lint and build run: | + git branch + git log -n 3 pushd vscode-extension npm install npm run lint From e2ad5e10ad85c9c6dd7d7f6f0cde1349f0368b06 Mon Sep 17 00:00:00 2001 From: Yan Xu Date: Tue, 19 Nov 2024 12:34:20 +0800 Subject: [PATCH 3/3] Update pr-check.yml --- .github/workflows/pr-check.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml index e984298..0b248d6 100644 --- a/.github/workflows/pr-check.yml +++ b/.github/workflows/pr-check.yml @@ -19,8 +19,6 @@ jobs: - name: Lint and build run: | - git branch - git log -n 3 pushd vscode-extension npm install npm run lint