Skip to content

Commit

Permalink
chore: Merge workflows into a single CI workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
dustinbyrne committed Feb 2, 2024
1 parent 2bc2a39 commit bb12c38
Show file tree
Hide file tree
Showing 3 changed files with 146 additions and 71 deletions.
146 changes: 146 additions & 0 deletions .github/workflows/ci.yml
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]
40 changes: 0 additions & 40 deletions .github/workflows/release.yml

This file was deleted.

31 changes: 0 additions & 31 deletions .github/workflows/test.yml

This file was deleted.

0 comments on commit bb12c38

Please sign in to comment.