-
Notifications
You must be signed in to change notification settings - Fork 25
65 lines (64 loc) · 2.37 KB
/
test-with-plugins.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
name: Test foreman plugins with foreman-js
on: [push, pull_request, workflow_dispatch]
jobs:
test-plugins:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- repo: katello
org: Katello
use-foreman: true
- repo: foreman-tasks
org: theforeman
use-foreman: false
steps:
- uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: 14.x
- name: Checkout foreman-js
uses: actions/checkout@v2
with:
path: ./projects/foreman-js
- name: Checkout foreman
if: ${{ matrix.use-foreman }}
uses: actions/checkout@v2
with:
repository: theforeman/foreman
path: ./projects/foreman
- name: Checkout ${{ matrix.repo }}
if: ${{ matrix.repo != 'foreman' }}
uses: actions/checkout@v2
with:
repository: ${{ matrix.org }}/${{ matrix.repo }}
ref: ${{ matrix.ref }}
path: ./projects/${{ matrix.repo }}
- name: Install foreman-js npm dependencies
run: npm install
working-directory: ${{ github.workspace }}/projects/foreman-js
- name: Install foreman npm dependencies
if: ${{ matrix.use-foreman }}
run: npm install
working-directory: ${{ github.workspace }}/projects/foreman
- name: Install ${{ matrix.repo }} npm dependencies
if: ${{ matrix.repo != 'foreman' }}
run: npm install
working-directory: ${{ github.workspace }}/projects/${{ matrix.repo }}
- name: Link foreman-js to foreman
if: ${{ matrix.use-foreman }}
run: npm run link -- --location '${{ github.workspace }}/projects/foreman'
working-directory: ${{ github.workspace }}/projects/foreman-js
- name: Link foreman-js to ${{ matrix.repo }}
run: npm run link -- --location '${{ github.workspace }}/projects/${{ matrix.repo }}'
working-directory: ${{ github.workspace }}/projects/foreman-js
- name: Run ${{ matrix.repo }} tests
run: npm test
working-directory: ${{ github.workspace }}/projects/${{ matrix.repo }}
- name: Run ${{ matrix.repo }} lint
run: npm run lint
working-directory: ${{ github.workspace }}/projects/${{ matrix.repo }}