-
Notifications
You must be signed in to change notification settings - Fork 236
86 lines (73 loc) · 2.35 KB
/
scriptTests.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
78
79
80
81
82
83
84
85
86
name: Scripts Tests
on:
push:
branches:
- '**'
tags-ignore:
- '**'
pull_request:
# Ensures that only the latest commit is running for each PR at a time.
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}-${{ github.ref }}
cancel-in-progress: true
jobs:
Scripts-tests:
name: Script tests (${{ matrix.suite.os }})
defaults:
run:
shell: bash
strategy:
fail-fast: false
matrix:
suite:
- os: "ubuntu"
- os: "macos"
- os: "windows"
osSuffix: ".exe"
runs-on: ${{ matrix.suite.os }}-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Go Cache
uses: actions/cache@v3
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: ${{ runner.os }}-go-
- name: Test install CLI - jf
run: sh build/installcli/jf.sh && jf --version
- name: Test install CLI - jfrog
run: sh build/installcli/jfrog.sh && jfrog --version
- name: Test get CLI - jf
run: sh build/getcli/jf.sh && ./jf --version
- name: Test get CLI - jfrog
run: sh build/getcli/jfrog.sh && ./jfrog --version
- name: Test Build CLI - sh
run: |
sh build/build.sh
./jf${{ matrix.suite.osSuffix }} --version
if: ${{ matrix.suite.os != 'windows' }}
- name: Test Build CLI - bat
run: |
build/build.bat
./jf${{ matrix.suite.osSuffix }} --version
if: ${{ matrix.suite.os == 'windows' }}
- name: Check if package.json build files changed
id: npm-changed-files
uses: tj-actions/changed-files@v39
with:
files: build/npm/*/package.json
- name: Test install npm - v2
working-directory: build/npm/v2
run: |
npm install
bin/jfrog${{ matrix.suite.osSuffix }} --version
if: steps.npm-changed-files.outputs.any_changed == 'false'
- name: Test install npm - v2-jf
working-directory: build/npm/v2-jf
run: |
npm install
bin/jf${{ matrix.suite.osSuffix }} --version
if: steps.npm-changed-files.outputs.any_changed == 'false'