Skip to content

Commit

Permalink
embedded ply
Browse files Browse the repository at this point in the history
  • Loading branch information
donaldoakes committed Nov 11, 2022
1 parent f87d753 commit 194fe5e
Show file tree
Hide file tree
Showing 10 changed files with 81,084 additions and 11,501 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,18 @@ on:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
branches: [ main ]

jobs:
build-test:
runs-on: ubuntu-latest
env:
PLY_VALUES: ${{ secrets.PLY_VALUES }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '14.x'
node-version: '16.x'
- run: npm install
- run: npm run build
8 changes: 5 additions & 3 deletions .github/workflows/ply.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ on:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
branches: [ main ]

jobs:
ply:
Expand All @@ -13,9 +15,9 @@ jobs:
FORCE_COLOR: 'true'
PLY_VALUES: ${{ secrets.PLY_VALUES }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '14.x'
node-version: '16.x'
- run: npm install
- uses: ./
11 changes: 4 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,7 @@ jobs:
with:
node-version: '16.x'
- run: npm install
- uses: ply-ct/ply-action@v1.1.0
with:
ply-path: node_modules/ply-ct/dist
- uses: ply-ct/ply-action@v1.2.0
```
This example runs all Ply tests and fails if they don't succeed.

Expand All @@ -46,9 +44,8 @@ able to retrieve their workflow build status. The question mark at the end of th
## Private repositories
Private repositories can use ply-action as in the example above, but to include a badge some additional configuration is needed:
```yaml
- uses: ply-ct/ply-action@v1.1.0
- uses: ply-ct/ply-action@v1.2.0
with:
ply-path: node_modules/ply-ct/dist
github-token: ${{ secrets.MY_GITHUB_TOKEN }}
badge-branch: badge
badge-path: ply-badge.svg
Expand All @@ -65,7 +62,7 @@ If you've already integrated Ply CLI commands into a GitHub workflow (say with c
skip Ply test execution altogether, and use ply-action simply to perform a badge commit based on the results of previous Ply CLI run.
In that case, specify the path to an overall Ply results file created using the `--resultFile` [CLI arg](https://ply-ct.org/ply/topics/config):
```yaml
- uses: ply-ct/ply-action@v1.1.0
- uses: ply-ct/ply-action@v1.2.0
with:
ply-path: node_modules/ply-ct/dist
result-file: test/api/results/actual/ply-results.json
Expand All @@ -79,7 +76,7 @@ In that case, specify the path to an overall Ply results file created using the
| ------------ | -------------------------| ------------------------------------------------------------------------------------------------------|
| plyees | (all ply tests) | Glob pattern(s) for requests/flows/cases |
| cwd | . | Working directory for ply execution |
| ply-path | node-modules/ply-ct/dist | Path to ply package |
| ply-path | (embedded ply) | Path to ply package when installed as dependency (eg: (eg: node_modules/@ply-ct/ply/dist)) |
| result-file | | Result file in case Ply tests were already run in a previous workflow/job |
| badge-branch | | Branch to contain status badge (eg: "badge"). Needed to display Ply badge for private repositories. |
| badge-path | ply-badge.svg | Save badge to this file path (relative to repo root). Only used with badge-branch. |
Expand Down
3 changes: 1 addition & 2 deletions action.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Ply CT
name: ply-action
description: Ply autotest execution and status badge
branding:
icon: play
Expand All @@ -14,7 +14,6 @@ inputs:
ply-path:
description: 'Path to ply package (eg: node_modules/@ply-ct/ply/dist)'
required: false
default: node_modules/@ply-ct/ply/dist
result-file:
description: Result file in case Ply tests were already run in a previous workflow/job
required: false
Expand Down
Loading

0 comments on commit 194fe5e

Please sign in to comment.