Skip to content

ci: Cache VSCode Insiders for test runners #2

ci: Cache VSCode Insiders for test runners

ci: Cache VSCode Insiders for test runners #2

Workflow file for this run

name: CI
on:
push:
jobs:
prepare:
# This first step pulls dependencies and compiles the extension.
# The results are cached to speed up the next three steps.
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
id: cache-modules
with:
path: node_modules
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
restore-keys: ${{ runner.os }}-modules-
- uses: actions/cache@v3
id: cache-vscode-test
with:
path: .vscode-test/vscode-*
key: ${{ runner.os }}-vscode-test
- uses: actions/cache@v3
id: cache-out
with:
path: out
key: ${{ github.sha }}
- uses: actions/setup-node@v3
with:
node-version: 16
cache: yarn
- run: yarn install --immutable
- run: yarn pretest
- run: yarn test:precache
- run: yarn compile
unit:
needs: prepare
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
id: cache-modules
with:
path: node_modules
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
restore-keys: ${{ runner.os }}-modules-
- uses: actions/cache@v3
id: cache-vscode-test
with:
path: .vscode-test/vscode-*
key: ${{ runner.os }}-vscode-test
- uses: actions/cache@v3
id: cache-out
with:
path: out
key: ${{ github.sha }}
- uses: actions/setup-node@v3
with:
node-version: 16
cache: yarn
- run: xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- yarn test:unit
name: Run unit tests
integration:
needs: prepare
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
id: cache-modules
with:
path: node_modules
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
restore-keys: ${{ runner.os }}-modules-
- uses: actions/cache@v3
id: cache-vscode-test
with:
path: .vscode-test/vscode-*
key: ${{ runner.os }}-vscode-test
- uses: actions/cache@v3
id: cache-out
with:
path: out
key: ${{ github.sha }}
- uses: actions/setup-node@v3
with:
node-version: 16
cache: yarn
- run:
xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- yarn test:integration
name: Run integration tests
system:
needs: prepare
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
id: cache-modules
with:
path: node_modules
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
restore-keys: ${{ runner.os }}-modules-
- uses: actions/cache@v3
id: cache-vscode-test
with:
path: .vscode-test/vscode-*
key: ${{ runner.os }}-vscode-test
- uses: actions/cache@v3
id: cache-out
with:
path: out
key: ${{ github.sha }}
- uses: actions/setup-node@v3
with:
node-version: 16
cache: yarn
- run: xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- yarn test:system
name: Run system tests
release:
runs-on: ubuntu-latest
needs: [unit, integration, system]
if: github.ref == 'refs/heads/master'
steps:
- uses: actions/checkout@v3
with:
persist-credentials: false
- uses: actions/cache@v2
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
- uses: actions/setup-node@v3
with:
node-version: 16
cache: yarn
- run: yarn semantic-release
env:
GH_TOKEN: ${{ secrets.SEMANTIC_RELEASE_BOT_GITHUB_TOKEN }}
VSCE_TOKEN: ${{ secrets.SEMANTIC_RELEASE_BOT_VSCE_TOKEN }}
GIT_AUTHOR_NAME: appland-release
GIT_AUTHOR_EMAIL: [email protected]
GIT_COMMITTER_NAME: appland-release
GIT_COMMITTER_EMAIL: [email protected]