-
Notifications
You must be signed in to change notification settings - Fork 293
45 lines (41 loc) · 1.43 KB
/
react_tests.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
name: React Tests (non-blocking)
on: [pull_request]
defaults:
run:
working-directory: ./katello
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
path: ${{ github.workspace }}/katello
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: '12.x'
# We could update the postinstall action for foreman to look for an environment variable for plugin webpack dirs
# before kicking off the ruby script to find them, this would eliminate the ruby dep and running `npm i` in Katello.
- uses: ruby/setup-ruby@v1
with:
ruby-version: 2.6
- name: Checkout Foreman repo
uses: actions/checkout@v2
with:
repository: theforeman/foreman
path: ${{ github.workspace }}/foreman # checkout Foreman and Katello as siblings, same as dev env
ref: develop
- name: Generate Foreman dependencies package-lock
run: npm i --package-lock-only --no-audit
working-directory: ${{ github.workspace }}/foreman
- name: Install Foreman dependencies
run: npm ci --no-audit
working-directory: ${{ github.workspace }}/foreman
- name: Generate Katello dependencies package-lock
run: npm i --package-lock-only --no-audit
- name: Install Katello dependencies
run: npm ci --no-audit
- name: Run Katello linting
run: npm run lint
- name: Run Katello tests
run: npm test