Skip to content

Commit

Permalink
Provide only one specific CI workflow for main branch (#596)
Browse files Browse the repository at this point in the history
Signed-off-by: Dominik Jelinek <[email protected]>
  • Loading branch information
djelinek authored Jan 23, 2023
1 parent 8c07d32 commit a8128de
Show file tree
Hide file tree
Showing 5 changed files with 91 additions and 143 deletions.
50 changes: 0 additions & 50 deletions .github/workflows/linux.yml

This file was deleted.

46 changes: 0 additions & 46 deletions .github/workflows/mac.yml

This file was deleted.

90 changes: 90 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
name: Main CI

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true

jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest ]
version: [ min, 1.71.2, 1.72.2, 1.73.1, max ]
include:
- os: macos-latest
version: max
- os: windows-latest
version: max
fail-fast: false

env:
CODE_VERSION: ${{ matrix.version }}

steps:
- name: Checkout Repository
uses: actions/checkout@v3

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 16
cache: npm

- name: Setup Dependencies
run: |
rm package-lock.json
npm run prepare-deps
- name: Install
run: npm install
- name: Build
run: npm run build
- name: Prepare Tests
run: npm run prepare-test

- name: Run Tests (mac, win)
if: ${{ contains(matrix.os, 'mac') || contains(matrix.os, 'win') }}
run: |
npm run test
- name: Run Tests (linux)
if: ${{ contains(matrix.os, 'ubuntu') }}
run: |
sudo apt-get install xvfb
export DISPLAY=:99
Xvfb -ac :99 -screen 0 1920x1080x16 &
npm run ci-test
- name: Upload Screenshots
uses: actions/upload-artifact@v3
if: failure()
with:
name: screenshots-${{ matrix.os }}-${{ matrix.version }}
path: test/test-project/**/screenshots/*.png

check:
if: always()
runs-on: ubuntu-latest
name: Status Check
needs: [ test ]
steps:
- name: Test Matrix Result
run: |
echo result = ${{ needs.test.result }}
- name: Status Check - success
if: ${{ needs.test.result == 'success' }}
run: |
echo "All tests successfully completed!"
exit 0
- name: Status Check - failure
if: ${{ needs.test.result != 'success' }}
run: |
echo "Status Check failed!"
exit 1
46 changes: 0 additions & 46 deletions .github/workflows/windows.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#### Stable VSCode
[![Linux CI](https://github.com/redhat-developer/vscode-extension-tester/actions/workflows/linux.yml/badge.svg)](https://github.com/redhat-developer/vscode-extension-tester/actions/workflows/linux.yml) [![MacOS CI](https://github.com/redhat-developer/vscode-extension-tester/actions/workflows/mac.yml/badge.svg)](https://github.com/redhat-developer/vscode-extension-tester/actions/workflows/mac.yml) [![Windows CI](https://github.com/redhat-developer/vscode-extension-tester/actions/workflows/windows.yml/badge.svg)](https://github.com/redhat-developer/vscode-extension-tester/actions/workflows/windows.yml)
[![Main CI](https://github.com/redhat-developer/vscode-extension-tester/actions/workflows/main.yml/badge.svg)](https://github.com/redhat-developer/vscode-extension-tester/actions/workflows/main.yml)

#### Insider VSCode
[![Nightly Insiders](https://github.com/redhat-developer/vscode-extension-tester/actions/workflows/insiders.yml/badge.svg)](https://github.com/redhat-developer/vscode-extension-tester/actions/workflows/insiders.yml)
Expand Down

0 comments on commit a8128de

Please sign in to comment.