-
Notifications
You must be signed in to change notification settings - Fork 36
77 lines (67 loc) · 2.38 KB
/
test.yml
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
name: Test
on:
push:
# Triggers the workflow on labeled PRs only.
pull_request_target:
types: [ labeled ]
schedule:
- cron: '0 6 * * *' # Runs every day at 6:00 AM GMT
jobs:
test:
if: (github.event_name == 'schedule' && github.repository_owner == 'jfrog') || github.event_name == 'push' || (github.event_name == 'pull_request_target' && contains(github.event.pull_request.labels.*.name, 'safe to test'))
name: ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
steps:
- uses: actions/checkout@v3
with:
submodules: true
ref: ${{ github.event.pull_request.head.sha }}
- name: Setup macOS
# Fix 'nvm is not compatible with the npm config "prefix" option' error on macOS
run: unset npm_config_prefix
if: runner.os == 'macOS'
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: 1.22.x
- name: Setup Python3
uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Setup NodeJS
uses: actions/setup-node@v4
with:
node-version: "16"
check-latest: true
- name: Setup Pnpm
uses: pnpm/action-setup@v3
with:
version: 8
- name: Install
run: npm i --ignore-scripts
# Make sure no new dependencies were installed after running 'npm i'
- name: Make sure branch is clean
run: git diff --exit-code
- name: Lint
run: npm run lint
- name: Pack Maven GAV Reader
run: mvn clean package -f resources/maven-gav-reader/pom.xml -B
- name: Install JFrog CLI for connectionManager tests
run: curl -fL https://install-cli.jfrog.io | sh && jf -v
- name: Tests on macOS, Windows
env:
JFROG_IDE_PLATFORM_URL: ${{ secrets.PLATFORM_URL }}
JFROG_IDE_ACCESS_TOKEN: ${{ secrets.PLATFORM_ADMIN_TOKEN }}
run: npm t
if: runner.os != 'Linux'
- name: Tests on Linux
env:
JFROG_IDE_PLATFORM_URL: ${{ secrets.PLATFORM_URL }}
JFROG_IDE_ACCESS_TOKEN: ${{ secrets.PLATFORM_ADMIN_TOKEN }}
# Run tests with Virtual frame buffer to allow running VS-Code without a display
run: xvfb-run npm t
if: runner.os == 'Linux'