Skip to content

patch: dev

patch: dev #18

Workflow file for this run

name: "Test"
concurrency:
group: ${{ github.workflow }} ${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
on:
pull_request: {}
push:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
permissions: write-all
strategy:
fail-fast: false
matrix:
kongVersion:
- "3.3.0.0"
# - "3.6.0.0"
steps:
- uses: actions/checkout@v3
- uses: Kong/kong-pongo-action@v1
with:
pongo_version: "master"
kong_version: ${{ matrix.kongVersion }}
- name: "test-${{ matrix.kongVersion }}"
run: |
pongo run -- --coverage > out.txt
echo "-> Producing pull request comment"
cat <<EOF > out-comment.txt
Test results for ${{ matrix.kongVersion }}:
\`\`\`
$(cat out.txt)
\`\`\`
EOF
- name: PR Comment
uses: actions/github-script@v5
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
const fs = require('fs')
const comment = fs.readFileSync('out-comment.txt', "utf8")
console.log(`json string ${comment}`)
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: comment
})