-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from draios/SITEOPS-1328-Remove-file-from-upsteam
Siteops 1328 remove file from upsteam
- Loading branch information
Showing
4 changed files
with
142 additions
and
80 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 |
---|---|---|
@@ -1,75 +1,96 @@ | ||
on: [push] | ||
|
||
jobs: | ||
local_test_lasttag: | ||
runs-on: ubuntu-latest | ||
name: Test local action without fixed version | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Test local action | ||
id: local-action | ||
uses: ./ | ||
with: | ||
upstream_repo: sysdiglabs/kube-psp-advisor | ||
local_patch_dir: tests/sysdiglabs/kube-psp-advisor | ||
outputs: | ||
used_tag: ${{ steps.local-action.outputs.tag }} | ||
used_latest: ${{ steps.local-action.outputs.latest }} | ||
tag_major: ${{ steps.local-action.outputs.tag_major }} | ||
tag_minor: ${{ steps.local-action.outputs.tag_minor }} | ||
tag_patch: ${{ steps.local-action.outputs.tag_patch }} | ||
local_test_lasttag: | ||
runs-on: ubuntu-latest | ||
name: Test local action without fixed version | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Test local action | ||
id: local-action | ||
uses: ./ | ||
with: | ||
upstream_repo: sysdiglabs/kube-psp-advisor | ||
local_patch_dir: tests/sysdiglabs/kube-psp-advisor | ||
outputs: | ||
used_tag: ${{ steps.local-action.outputs.tag }} | ||
used_latest: ${{ steps.local-action.outputs.latest }} | ||
tag_major: ${{ steps.local-action.outputs.tag_major }} | ||
tag_minor: ${{ steps.local-action.outputs.tag_minor }} | ||
tag_patch: ${{ steps.local-action.outputs.tag_patch }} | ||
|
||
local_test_fixed: | ||
runs-on: ubuntu-latest | ||
name: Test local action with fixed version | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Test local action | ||
id: local-action | ||
uses: ./ | ||
with: | ||
upstream_repo: sysdiglabs/kube-psp-advisor | ||
local_patch_dir: tests/sysdiglabs/kube-psp-advisor | ||
upstream_ref: master | ||
outputs: | ||
used_tag: ${{ steps.local-action.outputs.tag }} | ||
used_latest: ${{ steps.local-action.outputs.latest }} | ||
tag_major: ${{ steps.local-action.outputs.tag_major }} | ||
tag_minor: ${{ steps.local-action.outputs.tag_minor }} | ||
tag_patch: ${{ steps.local-action.outputs.tag_patch }} | ||
local_test_fixed: | ||
runs-on: ubuntu-latest | ||
name: Test local action with fixed version | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Test local action | ||
id: local-action | ||
uses: ./ | ||
with: | ||
upstream_repo: sysdiglabs/kube-psp-advisor | ||
local_patch_dir: tests/sysdiglabs/kube-psp-advisor | ||
upstream_ref: master | ||
outputs: | ||
used_tag: ${{ steps.local-action.outputs.tag }} | ||
used_latest: ${{ steps.local-action.outputs.latest }} | ||
tag_major: ${{ steps.local-action.outputs.tag_major }} | ||
tag_minor: ${{ steps.local-action.outputs.tag_minor }} | ||
tag_patch: ${{ steps.local-action.outputs.tag_patch }} | ||
|
||
local_test_upstream_remove_files: | ||
runs-on: ubuntu-latest | ||
name: Test local action with upstream_remove_files set | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Test local action | ||
id: local-action | ||
uses: ./ | ||
with: | ||
upstream_repo: sysdiglabs/kube-psp-advisor | ||
local_patch_dir: tests/sysdiglabs/kube-psp-advisor | ||
upstream_ref: master | ||
upstream_remove_files: | | ||
print_results: | ||
runs-on: ubuntu-latest | ||
name: Print test results | ||
needs: [local_test_lasttag, local_test_fixed] | ||
steps: | ||
- run: | | ||
echo "local_test_lasttag: ${{ needs.local_test_lasttag.outputs.used_tag }},${{ needs.local_test_lasttag.outputs.used_latest }}" | ||
echo "local_test_fixed: ${{ needs.local_test_fixed.outputs.used_tag }},${{ needs.local_test_fixed.outputs.used_latest }}" | ||
echo "semver_fixed: ${{ needs.local_test_fixed.outputs.tag_major }}, ${{ needs.local_test_fixed.outputs.tag_minor }}, ${{ needs.local_test_fixed.outputs.tag_patch }}" | ||
echo "semver_lasttag: ${{ needs.local_test_lasttag.outputs.tag_major }}, ${{ needs.local_test_lasttag.outputs.tag_minor }}, ${{ needs.local_test_lasttag.outputs.tag_patch }}" | ||
shell: bash | ||
local_test_upstream_remove_files: | ||
runs-on: ubuntu-latest | ||
name: Test local action with upstream_remove_files set | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Test local action | ||
id: local-action | ||
uses: ./ | ||
with: | ||
upstream_repo: sysdiglabs/kube-psp-advisor | ||
local_patch_dir: tests/sysdiglabs/kube-psp-advisor | ||
upstream_ref: master | ||
upstream_remove_files: | | ||
version | ||
comparator/comparator.go | ||
- name: Assert that files are removed | ||
id: test-remove | ||
run: |- | ||
- name: Assert that files are removed | ||
id: test-remove | ||
run: |- | ||
! [[ -f upstream/version ]] && ! [[ -f upstream/comparator/comparator.go ]] | ||
shell: bash | ||
shell: bash | ||
|
||
print_results: | ||
runs-on: ubuntu-latest | ||
name: Print test results | ||
needs: [local_test_lasttag, local_test_fixed] | ||
steps: | ||
- run: | | ||
echo "local_test_lasttag: ${{ needs.local_test_lasttag.outputs.used_tag }},${{ needs.local_test_lasttag.outputs.used_latest }}" | ||
echo "local_test_fixed: ${{ needs.local_test_fixed.outputs.used_tag }},${{ needs.local_test_fixed.outputs.used_latest }}" | ||
echo "semver_fixed: ${{ needs.local_test_fixed.outputs.tag_major }}, ${{ needs.local_test_fixed.outputs.tag_minor }}, ${{ needs.local_test_fixed.outputs.tag_patch }}" | ||
echo "semver_lasttag: ${{ needs.local_test_lasttag.outputs.tag_major }}, ${{ needs.local_test_lasttag.outputs.tag_minor }}, ${{ needs.local_test_lasttag.outputs.tag_patch }}" | ||
shell: bash | ||
local_test_copy_from_upstream: | ||
runs-on: ubuntu-latest | ||
name: Test local action with upstream_copy set | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Test local action | ||
id: local-action | ||
uses: ./ | ||
with: | ||
upstream_repo: sysdiglabs/kube-psp-advisor | ||
local_patch_dir: tests/sysdiglabs/kube-psp-advisor | ||
upstream_ref: master | ||
upstream_copy: | | ||
generator/* tests/ | ||
- name: Assert that files are copied | ||
id: test-copy | ||
run: |- | ||
[[ -f tests/generator.go ]] && [[ -f tests/generator_test.go ]] | ||
shell: bash |
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
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
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