-
Notifications
You must be signed in to change notification settings - Fork 87
57 lines (49 loc) · 1.53 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
name: "Test"
on: [push, pull_request]
jobs:
test:
runs-on: ${{ matrix.os }}
env:
JF_ENV_LOCAL: eyJ2ZXJzaW9uIjoxLCJ1cmwiOiJodHRwOi8vMTI3LjAuMC4xOjgwODEvYXJ0aWZhY3RvcnkvIiwidXNlciI6ImFkbWluIiwicGFzc3dvcmQiOiJBUEI3REVaUlBpSHFIRFRRb2tMa3g5aGh6S1QiLCJzZXJ2ZXJJZCI6ImxvY2FsIn0=
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
version: ["", "latest", "1.29.0"]
fail-fast: false
steps:
# Checkout and install prerequisites
- name: Checkout
uses: actions/checkout@v3
- name: Setup NodeJS
uses: actions/setup-node@v3
with:
node-version: "16.x"
# Run action according to the input version
- name: Setup JFrog CLI
if: matrix.version != ''
uses: ./
with:
version: ${{ matrix.version }}
- name: Setup default JFrog CLI
if: matrix.version == ''
uses: ./
# Run --version
- name: Check versions
run: jf --version && jfrog --version
# Check local server successfully configured
- name: Sanity
run: jf c show local || jfrog rt config show local
# Check build URL
- name: Check build URL
uses: wei/curl@master
with:
args: -I ${JFROG_CLI_BUILD_URL}
if: runner.os == 'Linux'
# Check environment variables
- name: Check action environment
run: node scripts/check-env.js
# Install and run tests
- name: Install
run: npm i
- name: Unit tests
run: npm t