-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Merge workflows into a single CI workflow
- Loading branch information
1 parent
2bc2a39
commit bb12c38
Showing
3 changed files
with
146 additions
and
71 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 |
---|---|---|
@@ -0,0 +1,146 @@ | ||
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 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: | ||
name: Package and release to VS Code marketplace | ||
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] |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.