abapGit/.github/workflows/test.yml
Naveen d6d1e9e8cb
Set permissions for GitHub actions (#5470)
- Included permissions for the action. https://github.com/ossf/scorecard/blob/main/docs/checks.md#token-permissions

https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions

https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs

[Keeping your GitHub Actions and workflows secure Part 1: Preventing pwn requests](https://securitylab.github.com/research/github-actions-preventing-pwn-requests/)

 Restrict the GitHub token permissions only to the required ones; this way, even if the attackers will succeed in compromising your workflow, they won’t be able to do much.

Signed-off-by: naveensrinivasan <172697+naveensrinivasan@users.noreply.github.com>
2022-04-15 08:24:36 +02:00

46 lines
946 B
YAML

name: test
on:
pull_request:
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '16'
- name: npm install
run: |
npm install
npm run eslint
npm run merge
npm run merge.ci
- name: Upload build artifact
uses: actions/upload-artifact@main
with:
name: zabapgit_standalone.abap
path: ./zabapgit.abap
retention-days: 7
test:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '16'
- name: npm install
run: npm install
- name: npm run unit
run: npm run unit
- name: npm run coverage
run: npm run coverage
- name: npm run integration
run: npm run integration