-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
issue-1116: Improve Main CI to use reusable workflow strategy (#1115)
- Loading branch information
Showing
2 changed files
with
54 additions
and
35 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
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,48 @@ | ||
name: Main CI - template | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
version: | ||
required: true | ||
type: string | ||
|
||
jobs: | ||
test: | ||
name: ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ ubuntu-latest, macos-latest, windows-latest ] | ||
fail-fast: false | ||
|
||
env: | ||
CODE_VERSION: ${{ inputs.version }} | ||
TEST_RESOURCES: test-resources | ||
|
||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 18.15.x | ||
cache: npm | ||
|
||
- name: Run Tests (macOS, windows) | ||
if: matrix.os != 'ubuntu-latest' | ||
run: | | ||
npm test | ||
- name: Run Tests (linux) | ||
if: matrix.os == 'ubuntu-latest' | ||
run: | | ||
xvfb-run --auto-servernum --server-args='-screen 0 1920x1080x24' npm test | ||
- name: Upload Screenshots | ||
uses: actions/upload-artifact@v4 | ||
if: failure() | ||
with: | ||
name: screenshots-${{ matrix.os }}-${{ inputs.version }} | ||
path: ${{ github.workspace }}/test/**/screenshots/*.png |