|
|
|
@ -42,11 +42,37 @@ jobs: |
|
|
|
PKG_VERSION=$(jq -r .version package.json) |
|
|
|
PKG_VERSION=$(jq -r .version package.json) |
|
|
|
echo "::set-output name=package_version::$PKG_VERSION" |
|
|
|
echo "::set-output name=package_version::$PKG_VERSION" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lint: |
|
|
|
|
|
|
|
name: Lint |
|
|
|
|
|
|
|
runs-on: ubuntu-20.04 |
|
|
|
|
|
|
|
steps: |
|
|
|
|
|
|
|
- name: Checkout repo |
|
|
|
|
|
|
|
uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: Cache npm |
|
|
|
|
|
|
|
id: npm-cache |
|
|
|
|
|
|
|
uses: actions/cache@937d24475381cd9c75ae6db12cb4e79714b926ed |
|
|
|
|
|
|
|
with: |
|
|
|
|
|
|
|
path: '~/.npm' |
|
|
|
|
|
|
|
key: ${{ runner.os }}-npm-${{ hashFiles('package-lock.json') }} |
|
|
|
|
|
|
|
restore-keys: | |
|
|
|
|
|
|
|
${{ runner.os }}-npm- |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: Setup sub-module |
|
|
|
|
|
|
|
run: npm run sub:init |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: Install |
|
|
|
|
|
|
|
run: npm ci |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: Run linter |
|
|
|
|
|
|
|
run: npm run lint |
|
|
|
|
|
|
|
|
|
|
|
cli: |
|
|
|
cli: |
|
|
|
name: Build CLI |
|
|
|
name: Build CLI |
|
|
|
runs-on: windows-2019 |
|
|
|
runs-on: windows-2019 |
|
|
|
needs: setup |
|
|
|
needs: |
|
|
|
|
|
|
|
- setup |
|
|
|
|
|
|
|
- lint |
|
|
|
env: |
|
|
|
env: |
|
|
|
_PACKAGE_VERSION: ${{ needs.setup.outputs.package_version }} |
|
|
|
_PACKAGE_VERSION: ${{ needs.setup.outputs.package_version }} |
|
|
|
_WIN_PKG_FETCH_VERSION: 16.13.0 |
|
|
|
_WIN_PKG_FETCH_VERSION: 16.13.0 |
|
|
|
@ -133,9 +159,6 @@ jobs: |
|
|
|
- name: Install |
|
|
|
- name: Install |
|
|
|
run: npm ci |
|
|
|
run: npm ci |
|
|
|
|
|
|
|
|
|
|
|
- name: Run linter |
|
|
|
|
|
|
|
run: npm run lint |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: Run tests |
|
|
|
- name: Run tests |
|
|
|
run: npm run test |
|
|
|
run: npm run test |
|
|
|
|
|
|
|
|
|
|
|
@ -318,6 +341,7 @@ jobs: |
|
|
|
needs: |
|
|
|
needs: |
|
|
|
- cloc |
|
|
|
- cloc |
|
|
|
- setup |
|
|
|
- setup |
|
|
|
|
|
|
|
- lint |
|
|
|
- cli |
|
|
|
- cli |
|
|
|
- snap |
|
|
|
- snap |
|
|
|
steps: |
|
|
|
steps: |
|
|
|
@ -326,6 +350,7 @@ jobs: |
|
|
|
env: |
|
|
|
env: |
|
|
|
CLOC_STATUS: ${{ needs.cloc.result }} |
|
|
|
CLOC_STATUS: ${{ needs.cloc.result }} |
|
|
|
SETUP_STATUS: ${{ needs.setup.result }} |
|
|
|
SETUP_STATUS: ${{ needs.setup.result }} |
|
|
|
|
|
|
|
LINT_STATUS: ${{ needs.lint.result }} |
|
|
|
CLI_STATUS: ${{ needs.cli.result }} |
|
|
|
CLI_STATUS: ${{ needs.cli.result }} |
|
|
|
SNAP_STATUS: ${{ needs.snap.result }} |
|
|
|
SNAP_STATUS: ${{ needs.snap.result }} |
|
|
|
run: | |
|
|
|
run: | |
|
|
|
@ -333,6 +358,8 @@ jobs: |
|
|
|
exit 1 |
|
|
|
exit 1 |
|
|
|
elif [ "$SETUP_STATUS" = "failure" ]; then |
|
|
|
elif [ "$SETUP_STATUS" = "failure" ]; then |
|
|
|
exit 1 |
|
|
|
exit 1 |
|
|
|
|
|
|
|
elif [ "$LINT_STATUS" = "failure" ]; then |
|
|
|
|
|
|
|
exit 1 |
|
|
|
elif [ "$CLI_STATUS" = "failure" ]; then |
|
|
|
elif [ "$CLI_STATUS" = "failure" ]; then |
|
|
|
exit 1 |
|
|
|
exit 1 |
|
|
|
elif [ "$SNAP_STATUS" = "failure" ]; then |
|
|
|
elif [ "$SNAP_STATUS" = "failure" ]; then |
|
|
|
|