This repository has been archived by the owner on Oct 23, 2024. It is now read-only.
forked from redhat-developer/vscode-yaml
-
Notifications
You must be signed in to change notification settings - Fork 0
79 lines (67 loc) · 2.21 KB
/
CI.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# This is a basic workflow
name: CI
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the main branch
on:
push:
branches: [main]
pull_request:
branches: [main]
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
# Set up Node
- name: Use Node 14
uses: actions/setup-node@v1
with:
node-version: 14
# Run install dependencies
- name: Install dependencies
run: |
echo Custom dependencies
yarn
# Build extension
- name: Run build
run: yarn build
# # Run tests
# - name: Run Test
# uses: GabrielBB/xvfb-action@fe2609f8182a9ed5aee7d53ff3ed04098a904df2 #v1.0
# with:
# run: yarn test
# # Run UI tests
# - name: Run UI Test
# uses: GabrielBB/xvfb-action@86d97bde4a65fe9b290c0b3fb92c2c4ed0e5302d #v1.6
# with:
# run: yarn run ui-test
# options: -screen 0 1920x1080x24
#Package vsix
- name: Build .vsix package on Linux
if: matrix.os == 'ubuntu-latest'
run: |
VERSION=$(node -p "require('./package.json').version")
npx vsce package -o vscode-yaml-${VERSION}-${GITHUB_RUN_ID}-${GITHUB_RUN_NUMBER}.vsix
#Upload vsix
- name: Upload linux-built vsix
if: matrix.os == 'ubuntu-latest'
uses: actions/upload-artifact@v2
with:
name: vscode-yaml
path: vscode-yaml*.vsix
# Archive test results
- name: Archiving test artifacts
uses: actions/upload-artifact@v2
with:
name: ${{ matrix.os }}-artifacts
path: |
test-resources/screenshots/*.png
retention-days: 2