Skip to content

Commit

Permalink
add removeLabel action for tests (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
attiasas authored Jan 1, 2024
1 parent 2e44e04 commit 6e67677
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 6 deletions.
10 changes: 6 additions & 4 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
- [ ] All [tests](https://github.com/jfrog/jfrog-cli-security#tests) passed. If this feature is not already covered by the tests, I added new tests.
- [ ] The pull request is targeting the `dev` branch.
- [ ] The code has been validated to compile successfully by running `go vet ./...`.
- [ ] The code has been formatted properly using `go fmt ./...`.
- [ ] All [static analysis checks](https://github.com/jfrog/jfrog-cli-security/actions/workflows/analysis.yml) passed.
- [ ] This pull request is on the dev branch.
- [ ] I used gofmt for formatting the code before submitting the pull request.
-----
- [ ] All [tests](https://github.com/jfrog/jfrog-cli-security/actions/workflows/test.yml) have passed. If this feature is not already covered by the tests, new tests have been added.

-----
18 changes: 18 additions & 0 deletions .github/workflows/removeLabel.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Remove Label
on:
pull_request_target:
types: [labeled]
# Ensures that only the latest commit is running for each PR at a time.
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}-${{ github.ref }}
cancel-in-progress: true
jobs:
Remove-Label:
if: contains(github.event.pull_request.labels.*.name, 'safe to test')
name: Remove label
runs-on: ubuntu-latest
steps:
- name: Remove 'safe to test'
uses: actions-ecosystem/action-remove-labels@v1
with:
labels: "safe to test"
8 changes: 6 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,5 +65,9 @@ jobs:
with:
ref: ${{ github.event.pull_request.head.sha }}
# Test
- name: Run security tests
run: go test -v github.com/jfrog/jfrog-cli-security --timeout 0 --race
- name: Run security tests (without Docker Scan)
run: go test -v github.com/jfrog/jfrog-cli-security --timeout 0 --test.security --jfrog.url=${{ secrets.PLATFORM_URL }} --jfrog.adminToken=${{ secrets.PLATFORM_ADMIN_TOKEN }} --jfrog.user=${{ secrets.PLATFORM_USER }} --test.containerRegistry=${{ secrets.CONTAINER_REGISTRY }} --ci.runId=${{ runner.os }}-xray
if: ${{ matrix.os != 'ubuntu' }}
- name: Run security tests (with Docker Scan, only on Ubuntu)
run: go test -v github.com/jfrog/jfrog-cli-security --timeout 0 --test.security --test.dockerScan --jfrog.url=${{ secrets.PLATFORM_URL }} --jfrog.adminToken=${{ secrets.PLATFORM_ADMIN_TOKEN }} --test.containerRegistry=${{ secrets.CONTAINER_REGISTRY }} --ci.runId=${{ runner.os }}-xray
if: ${{ matrix.os == 'ubuntu' }}

0 comments on commit 6e67677

Please sign in to comment.