-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #128 from Discookie/ericsson/fix-vsce
Fix vsce rewriting and refactor tests
- Loading branch information
Showing
4 changed files
with
104 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: Package CodeChecker VSCode extension | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
version: | ||
required: true | ||
type: string | ||
|
||
jobs: | ||
package: | ||
name: Create extension package | ||
runs-on: ubuntu-22.04 | ||
|
||
strategy: | ||
matrix: | ||
registry: [open-vsx, vs-marketplace] | ||
include: | ||
- registry: open-vsx | ||
name: codechecker | ||
- registry: vs-marketplace | ||
name: vscode-codechecker | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Enable Yarn 2 | ||
run: yarn set version stable | ||
|
||
- name: Install dependencies | ||
run: yarn install --immutable | ||
|
||
# Should be kept in sync with `deploy.yml`. | ||
- name: Create vsix package | ||
if: success() | ||
id: build | ||
run: | | ||
sed -i 's/"name": "codechecker"/"name": "${{ matrix.name }}"/' package.json | ||
sed -i 's/codechecker@workspace/${{ matrix.name }}@workspace/' yarn.lock | ||
yarn run vsce package --no-git-tag-version --yarn ${{ inputs.version }} | ||
echo vsixPath=$(readlink -f *.vsix) >>$GITHUB_OUTPUT | ||
- name: Create vsix artifact | ||
if: success() | ||
uses: actions/upload-artifact@master | ||
with: | ||
name: ${{ matrix.registry }}-package | ||
path: ${{ steps.build.outputs.vsixPath }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: codechecker-vscodeplugin-tests | ||
|
||
# Triggers the workflow on push or pull request events. | ||
on: [push, pull_request] | ||
|
||
jobs: | ||
version: | ||
name: Get version number | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Get the version | ||
id: get_version | ||
run: echo version=0.0.0-$(echo ${GITHUB_SHA} | head -c 7) >>$GITHUB_OUTPUT | ||
|
||
package: | ||
needs: [version] | ||
uses: ./.github/workflows/package.yml | ||
with: | ||
version: ${{ needs.version.outputs.version }} | ||
|
||
test: | ||
uses: ./.github/workflows/test.yml | ||
|
||
# Needed to run the packaging and tests in parallel | ||
test-commit: | ||
name: Run commit tests | ||
needs: [package, test] | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Do nothing | ||
run: ":" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,28 @@ | ||
name: codechecker-vscodeplugin-tests | ||
name: Run plugin tests | ||
|
||
# Triggers the workflow on push or pull request events. | ||
on: [push, pull_request, workflow_call] | ||
on: [workflow_call] | ||
|
||
jobs: | ||
test: | ||
name: Tests | ||
runs-on: ubuntu-22.04 | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Enable Yarn 2 | ||
run: yarn set version stable | ||
|
||
- name: Install dependencies | ||
run: yarn install --immutable | ||
|
||
- name: Install CodeChecker | ||
run: | | ||
sudo apt install -y clang-tidy | ||
sudo snap install codechecker --classic | ||
sudo snap alias codechecker CodeChecker | ||
CodeChecker version | ||
- name: Run tests | ||
uses: GabrielBB/[email protected] | ||
with: | ||
|