Skip to content

Commit

Permalink
Merge pull request #465 from nocalhost/dev
Browse files Browse the repository at this point in the history
Release v0.6.16
  • Loading branch information
zhangjian10 authored Mar 25, 2022
2 parents d965014 + 514a5e7 commit bb88026
Show file tree
Hide file tree
Showing 178 changed files with 13,341 additions and 25,267 deletions.
36 changes: 22 additions & 14 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,33 +12,41 @@ jobs:
name: build test plugin
runs-on: macos-10.15
steps:
- name: Set up Node 1.x
uses: actions/[email protected]
- uses: actions/setup-node@v2
with:
node-version: 12.x
node-version: ^14

- uses: pnpm/[email protected]
with:
version: 6
run_install: false

- name: Check out code into the project's root directory
uses: actions/checkout@v2
with:
fetch-depth: 0

- uses: actions/cache@v2
id: yarn-cache
id: pnpm-cache
with:
path: "**/node_modules"
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
key: ${{ runner.os }}-build-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: ${{ runner.os }}-build

- name: Install project dependencies
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn
- uses: pnpm/[email protected]
if: steps.pnpm-cache.outputs.cache-hit != 'true'
with:
version: 6
run_install: |
- recursive: true
args: [--frozen-lockfile]
- args: [--no-optional]
- name: Build
env:
MINIMUNM_VERSION_REQUIREMENT: ${{ secrets.MINIMUNM_VERSION_REQUIREMENT }}
run: |
yarn build
mv nocalhost-*.vsix nocalhost.vsix
run: pnpm build

- name: Push to Coding Artifacts
if: ${{ github.ref != 'refs/heads/dev' }}
run: |
Expand Down
36 changes: 27 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
tags:
- "v*"
workflow_dispatch:

jobs:
release-plugin:
Expand All @@ -12,25 +13,42 @@ jobs:
environment:
name: release
steps:
- name: Set up Node 1.x
uses: actions/[email protected]
- uses: actions/setup-node@v2
with:
node-version: 12.x
node-version: ^14

- uses: pnpm/[email protected]
with:
version: 6
run_install: false

- name: Check out code into the project's root directory
uses: actions/checkout@v2

- uses: actions/cache@v2
id: pnpm-cache
with:
path: "**/node_modules"
key: ${{ runner.os }}-build-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: ${{ runner.os }}-build

- uses: pnpm/[email protected]
if: steps.pnpm-cache.outputs.cache-hit != 'true'
with:
version: 6
run_install: |
- recursive: true
args: [--frozen-lockfile]
- args: [--no-optional]
- name: Get tag
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV

- name: build
env:
VERSION: ${{ env.RELEASE_VERSION }}
MINIMUNM_VERSION_REQUIREMENT: ${{ secrets.MINIMUNM_VERSION_REQUIREMENT }}
run: |
yarn install
yarn build
mv nocalhost-*.vsix nocalhost.vsix
run: pnpm build

- name: Create nocalhost-vscode-plugin Release
id: create_release
Expand All @@ -54,7 +72,7 @@ jobs:
asset_content_type: application/octet-stream

- name: Publish To VS Code Extension Marketplace
run: yarn run vsce publish -p ${{ secrets.VSCE_TOKEN }}
run: pnpm vsce publish -p ${{ secrets.VSCE_TOKEN }} --no-dependencies

- name: Publish openVSX
run: yarn run ovsx publish nocalhost.vsix -p ${{ secrets.OPEN_VSX_ACCESS_TOKEN }}
run: pnpm dlx ovsx publish nocalhost.vsix -p ${{ secrets.OPEN_VSX_ACCESS_TOKEN }}
29 changes: 20 additions & 9 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,28 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
node: [12]
steps:
- name: Install node.js
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}
- name: Check out the repository
uses: actions/checkout@v2
- name: Install node modules
run: |
npm i -g yarn
yarn install

- uses: actions/setup-node@v2
with:
node-version: ^14

- uses: actions/cache@v2
id: pnpm-cache
with:
path: "**/node_modules"
key: ${{ runner.os }}-ui-test-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: ${{ runner.os }}-ui-test

- uses: pnpm/[email protected]
if: steps.pnpm-cache.outputs.cache-hit != 'true'
with:
version: 6
run_install: |
- recursive: true
args: [--frozen-lockfile]
- name: Run tests
run: npm run test
79 changes: 34 additions & 45 deletions .github/workflows/ui-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on:
pull_request:
branches: [dev, main]
push:
branches: [test/vscode-puppeteer]
branches: [test/vcluster]
jobs:
test:
strategy:
Expand All @@ -16,32 +16,32 @@ jobs:
name: Run UI Tests
runs-on: ${{ matrix.os }}
steps:
- name: Create cluster
env:
TKE_SECRET_ID: ${{ secrets.TKE_SECRET_ID }}
TKE_SECRET_KEY: ${{ secrets.TKE_SECRET_KEY }}
run: |
curl -fL "https://nocalhost-generic.pkg.coding.net/nocalhost-test/binary/tketools?version=latest" -o ~/cluster
chmod +x ~/cluster
~/cluster create &> ~/cluster.log &
- uses: actions/checkout@v2
with:
fetch-depth: 0

- uses: actions/setup-node@v2
with:
node-version: ^14

- uses: pnpm/[email protected]
with:
version: 6
run_install: false

- uses: actions/cache@v2
id: yarn-cache
id: pnpm-cache
with:
path: "**/node_modules"
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
key: ${{ runner.os }}-ui-test-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: ${{ runner.os }}-ui-test

- name: Install project dependencies
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn
- uses: pnpm/[email protected]
if: steps.pnpm-cache.outputs.cache-hit != 'true'
with:
version: 6
run_install: |
- args: [--frozen-lockfile]
# - name: Run tests
# uses: GabrielBB/[email protected]
Expand All @@ -55,59 +55,48 @@ jobs:
MINIMUNM_VERSION_REQUIREMENT: ${{ secrets.MINIMUNM_VERSION_REQUIREMENT }}
NHCTL_VERSION: dev
run: |
yarn run build:ext
pnpm run build:test
rm -rf .vscode-test
ls -al
- name: Wait cluster ready
timeout-minutes: 30
run: >-
while [ ! -f "${HOME}/config" ];do
tail -n 3 ~/cluster.log
sleep 10s;
done
- name: Set kubeconfig
run: |
NOCALHOST_KUBECONFIG=$(cat ~/config)
echo "NOCALHOST_KUBECONFIG<<EOF" >> $GITHUB_ENV
echo "$NOCALHOST_KUBECONFIG" >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
echo "::add-mask::$NOCALHOST_KUBECONFIG"
- name: Create cluster
uses: zhangjian10/nocalhost-server-cli@latest
with:
host: ${{ secrets.NOCALHOST_VCLUSTER_HOST_FOR_TEST }}
email: ${{ secrets.NOCALHOST_VCLUSTER_EMAIL_FOR_TEST }}
password: ${{ secrets.NOCALHOST_VCLUSTER_PASSWORD_FOR_TEST }}
action: devSpace.create

- name: Run tests
timeout-minutes: 20
env:
CYPRESS_EVERY_NTH_FRAME: 1
# LOGGER_LEVEL: DEBUG
run: yarn run test:ext

# - name: Destroy cluster
# if: ${{ always() }} failure
# env:
# TKE_SECRET_ID: ${{ secrets.TKE_SECRET_ID }}
# TKE_SECRET_KEY: ${{ secrets.TKE_SECRET_KEY }}
# run: ~/cluster destroy
VIDEO_CAPTURE: 1
run: pnpm run test:ext

- name: Artifact screenshot
if: ${{ always() }}
run: mv .screenshot ~/.nh/screenshot
run: |
mkdir -p ~/.nh/screenshot
mv .screenshot/*.jpeg ~/.nh/screenshot
cp ~/.kube/config ~/.nh
- uses: actions/upload-artifact@v2
if: ${{ always() }}
with:
name: artifact-${{ runner.os }}-${{ github.run_id }}
path: |
~/.nh/screenshot
~/.nh/nhctl/ns
~/.nh/nhctl/logs/nhctl.log
~/.nh/vscode-plugin/vsc_log
- name: Artifact dependency
if: ${{ failure() }}
run: |
mkdir .dependency
mv .screenshot/*.mp4 .dependency/
cp ~/.nh/bin/nhctl .dependency/
cp nocalhost.vsix .dependency/
cp ~/config .dependency/
- uses: actions/upload-artifact@v2
if: ${{ failure() }}
Expand Down
2 changes: 1 addition & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// for the documentation about the extensions.json format
"recommendations": [
"dbaeumer.vscode-eslint",
"amodio.tsl-problem-matcher",
"connor4312.esbuild-problem-matchers",
"esbenp.prettier-vscode"
]
}
4 changes: 0 additions & 4 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
// A launch configuration that compiles the extension and then opens it inside a new window
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
{
"version": "0.2.0",
"configurations": [
Expand Down
5 changes: 1 addition & 4 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,8 @@
{
"type": "npm",
"script": "watch",
"problemMatcher": ["$ts-webpack-watch", "$tslint-webpack-watch"],
"isBackground": true,
"presentation": {
"reveal": "never"
},
"problemMatcher": "$esbuild-watch",
"group": {
"kind": "build",
"isDefault": true
Expand Down
5 changes: 4 additions & 1 deletion .vscodeignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.vscode/**
.screenshot
.vscode-test/**
out/**
src/**
Expand All @@ -18,4 +19,6 @@ scripts/**
yarn-error.log
.prettierignore
jest.config.js
jest.setup.js
jest.setup.js
pnpm-lock.yaml
static
1 change: 0 additions & 1 deletion .yarnrc

This file was deleted.

Loading

0 comments on commit bb88026

Please sign in to comment.