Skip to content

Commit

Permalink
Add theforeman github actions for JS test
Browse files Browse the repository at this point in the history
  • Loading branch information
bastian-src committed Mar 27, 2024
1 parent ad430ce commit eef578f
Show file tree
Hide file tree
Showing 3 changed files with 98 additions and 23 deletions.
26 changes: 10 additions & 16 deletions .github/workflows/js_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,14 @@ on:
- 'package.json'
- 'package-lock.json'
- '.github/workflows/js_tests.yml'

concurrency:
group: ${{ github.ref_name }}-${{ github.workflow }}
cancel-in-progress: true

jobs:
test_js:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node-version: [12, 14]
steps:
- uses: actions/checkout@v2
- name: Setup Node
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Npm install
run: npm install
- name: Run plugin linter
run: npm run lint
test:
name: JavaScript
uses: theforeman/actions/.github/workflows/foreman_plugin_js.yml@v0
with:
plugin: foreman_resource_quota
92 changes: 86 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"main": "index.js",
"scripts": {
"lint": "tfm-lint --plugin -d /webpack",
"test": "tfm-test --config jest.config.js",
"test": "tfm-test --plugin --config jest.config.js",
"test:watch": "tfm-test --plugin --watchAll",
"test:current": "tfm-test --plugin --watch",
"publish-coverage": "tfm-publish-coverage",
Expand All @@ -27,6 +27,7 @@
"devDependencies": {
"@babel/core": "^7.7.0",
"@sheerun/mutationobserver-shim": "^0.3.3",
"@testing-library/jest-dom": "^6.4.2",
"@testing-library/react": "^10.4.9",
"@theforeman/builder": "^10.1.3",
"@theforeman/eslint-plugin-foreman": "13.0.0",
Expand Down

0 comments on commit eef578f

Please sign in to comment.