-
Notifications
You must be signed in to change notification settings - Fork 470
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#22706 Adding a new GHA for running CLI tests.
- Loading branch information
Showing
5 changed files
with
337 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# action.yml | ||
name: 'dotCMS CLI tests' | ||
description: 'Runs CLI tool tests' | ||
author: 'danielcolina-dotcms' | ||
inputs: | ||
docker_image: | ||
description: 'Docker image to use' | ||
required: true | ||
default: 'nginx' | ||
outputs: | ||
time: | ||
description: 'Index page' | ||
runs: | ||
using: node16 | ||
main: 'dist/index.js' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
const core = require('@actions/core'); | ||
const github = require('@actions/github'); | ||
|
||
try { | ||
const dockerImage = core.getInput('docker-image'); | ||
const time = new Date().toTimeString(); | ||
|
||
console.log(`Hello ${dockerImage}!`); | ||
core.setOutput('time', time); | ||
} catch (error) { | ||
core.setFailed(error.message); | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"name": "run-cli-tests", | ||
"version": "1.0.0", | ||
"description": "", | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
}, | ||
"keywords": [], | ||
"author": "", | ||
"license": "ISC", | ||
"dependencies": { | ||
"@actions/core": "^1.10.0", | ||
"@actions/github": "^5.1.1" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
name: CLI Tests | ||
on: | ||
pull_request: | ||
paths: | ||
- 'tools/dotcms-cli/api-data-model/**' | ||
- 'tools/dotcms-cli/cli/**' | ||
push: | ||
branches: | ||
- master | ||
- 'release-*' | ||
jobs: | ||
cli_test: | ||
name: CLI Tests | ||
runs-on: ubuntu-latest | ||
steps: | ||
- id: run-dotcms-cli-tests | ||
name: Run DotCMS CLI Tests | ||
uses: ./.github/actions/run-cli-tests | ||
with: | ||
docker_image: nginx | ||
|
||
- id: git-checkout | ||
name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: tests | ||
working-directory: ./tools/dotcms-cli | ||
run: | | ||
echo "tests" | ||
# - id: run-postman-tests | ||
# name: Run Postman Tests | ||
# timeout-minutes: 90 | ||
# uses: ./.github/actions/run-postman-tests | ||
# with: | ||
# built_image_name: ${{ needs.postman-tests-setup-job.outputs.built_image_name }} | ||
# license_key: ${{ secrets.DOTCMS_LICENSE }} | ||
# tests: ${{ steps.get-commit-message.outputs.commit_message }} | ||
# parallel_collection: ${{ matrix.parallel_collection }} | ||
# export_report: ${{ env.PUBLISH_MODE == 'ALL' || env.PUBLISH_MODE == 'RESULTS' }} | ||
|
||
|
||
|
||
# - name: tests | ||
# working-directory: ./tools/dotcms-cli | ||
# run: | | ||
# echo "tests" | ||
# ./gradlew clean test | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|