-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: add a basic testsuite and github workflows
- update dependencies - update docs and extension info
- Loading branch information
Showing
15 changed files
with
488 additions
and
37 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,23 @@ | ||
## Description | ||
Describe your changes in detail | ||
|
||
## Related Issue | ||
<!-- | ||
Describe your changes in detail. Why is this change required? What problem does it solve? | ||
--> | ||
|
||
If fixing a bug, there should be an issue describing it with steps to reproduce | ||
Please link to the issue here: | ||
## Related Issues | ||
|
||
## Motivation and Context | ||
Why is this change required? What problem does it solve? | ||
<!-- | ||
If fixing a bug, there should be an issue describing it, with steps to reproduce. Please link to the issue here. | ||
--> | ||
|
||
## How Has This Been Tested? | ||
|
||
<!-- | ||
Please describe in detail how you tested your changes. | ||
Include details of your testing environment, and the tests you ran to see how your change affects other areas of the code, etc. | ||
--> | ||
|
||
<!-- | ||
## Screenshots | ||
## Screenshots (if appropriate) | ||
(If appropriate.) | ||
--> |
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,123 @@ | ||
name: Release | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
branch: | ||
description: Branch to release from | ||
required: true | ||
default: main | ||
release-version: | ||
description: Version being released (e.g. 7.8.9) | ||
required: true | ||
next-version: | ||
description: Version after the release (e.g. 7.8.10-dev) | ||
required: true | ||
# pre-release: | ||
# type: boolean | ||
# description: Create a pre-release version | ||
# required: true | ||
# default: true | ||
changelog: | ||
type: boolean | ||
description: I have updated the CHANGELOG.md file | ||
required: true | ||
default: false | ||
debug: | ||
type: boolean | ||
description: Debug with tmate on failure | ||
required: true | ||
default: true | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
if: github.repository_owner == 'Apicurio' | ||
steps: | ||
- name: Check prerequisites | ||
if: ${{ !inputs.changelog }} | ||
run: | | ||
exit 1 | ||
- name: Set up npm | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 18 | ||
|
||
- name: Set up vsce | ||
run: | | ||
npm install -g @vscode/vsce | ||
- name: Set up ovsx | ||
run: | | ||
npm install -g ovsx | ||
- name: Checkout | ||
run: | | ||
git init | ||
git config user.name apicurio-ci | ||
git config user.email apicurio.ci@gmail.com | ||
git remote add origin "https://apicurio-ci:${{ secrets.ACCESS_TOKEN }}@github.com/Apicurio/apicurio-registry-vscode-plugin.git" | ||
git fetch | ||
git checkout --track "origin/${{ inputs.branch }}" | ||
- name: Dependencies | ||
run: | | ||
npm install | ||
- name: Compile | ||
run: | | ||
npm run compile | ||
- name: Run Registry | ||
run: | | ||
echo "REGISTRY_CID=$(docker run -d -p 8080:8080 quay.io/apicurio/apicurio-registry-mem:2.5.x-snapshot)" >> "$GITHUB_ENV" | ||
- name: Test | ||
run: | | ||
xvfb-run -a npm run test | ||
- name: Stop Registry | ||
run: | | ||
docker stop "$REGISTRY_CID" | ||
# - name: Configure pre-release | ||
# if: ${{ inputs.pre-release }} | ||
# run: | | ||
# echo "PRE_RELEASE=--pre-release" >> "$GITHUB_ENV" | ||
|
||
# - name: Configure release | ||
# if: ${{ !inputs.pre-release }} | ||
# run: | | ||
# echo "PRE_RELEASE=" >> "$GITHUB_ENV" | ||
|
||
- name: Package | ||
run: | | ||
vsce package -m "Update to release version ${{ inputs.release-version }}" "${{ inputs.release-version }}" | ||
echo "VSIX_FILE=apicurio-registry-explorer-${{ inputs.release-version }}.vsix" >> "$GITHUB_ENV" | ||
- name: Publish with vsce | ||
run: | | ||
vsce publish -i "$VSIX_FILE" -p "${{ secrets.VSCODE_MARKETPLACE_ACCESS_TOKEN }}" | ||
- name: Publish with ovsx | ||
run: | | ||
ovsx publish -i "$VSIX_FILE" -p "${{ secrets.OVSX_REGISTRY_ACCESS_TOKEN }}" | ||
- name: Next version | ||
# if: ${{ !inputs.pre-release }} | ||
run: | | ||
npm version --no-git-tag-version ${{ inputs.next-version }} | ||
git commit -m "Update to next development version ${{ inputs.next-version }}" | ||
- name: Push | ||
# if: ${{ !inputs.pre-release }} | ||
run: | | ||
git push origin "${{ inputs.branch }}" | ||
git push origin "v${{ inputs.release-version }}" | ||
# TODO: Create a GitHub release | ||
|
||
- name: Setup tmate session | ||
if: failure() && inputs.debug | ||
uses: mxschmitt/action-tmate@v3 |
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,46 @@ | ||
name: Test | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
if: github.repository_owner == 'Apicurio' | ||
steps: | ||
- name: Set up npm | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 18 | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Dependencies | ||
run: | | ||
npm install | ||
- name: Compile | ||
run: | | ||
npm run compile | ||
- name: Run Registry | ||
run: | | ||
echo "REGISTRY_CID=$(docker run -d -p 8080:8080 quay.io/apicurio/apicurio-registry-mem:2.5.x-snapshot)" >> "$GITHUB_ENV" | ||
- name: Test | ||
run: | | ||
xvfb-run -a npm run test | ||
- name: Stop Registry | ||
run: | | ||
docker stop "$REGISTRY_CID" | ||
# - name: Setup tmate session | ||
# if: failure() | ||
# uses: mxschmitt/action-tmate@v3 |
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,8 +1,8 @@ | ||
.DS_Store | ||
.vscode/settings.json | ||
*.vsix | ||
out | ||
.idea | ||
.test-extensions | ||
.trash~ | ||
.vscode/settings.json | ||
node_modules | ||
yarn.lock | ||
out | ||
package-lock.json | ||
.idea |
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,9 +1,12 @@ | ||
.vscode/** | ||
.vscode-test/** | ||
out/test/** | ||
test/** | ||
src/** | ||
**/*.map | ||
.github | ||
.gitignore | ||
.idea | ||
.test-extensions | ||
.trash~ | ||
.vscode | ||
out/test | ||
out/*.js.map | ||
settings.json | ||
src | ||
test-resources | ||
tsconfig.json | ||
vsc-extension-quickstart.md |
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
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,6 @@ | ||
{ | ||
"typescript.updateImportsOnFileMove.enabled": "always", | ||
"workbench.editor.enablePreview": true, | ||
"git.autoRepositoryDetection": false, | ||
"terminal.integrated.sendKeybindingsToShell": true | ||
} |
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,3 @@ | ||
module.exports = { | ||
timeout: 999999999 | ||
} |
Oops, something went wrong.