-
Notifications
You must be signed in to change notification settings - Fork 176
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Sync changes from staging repository (#1043)
* Add validate Workflow; separate lint and test checks (#1) * Add Workflow to upload on merge to main (#2) * Add Workflow to upload on merge to main * Update job names * Update validate and upload step names (#3) * Update Validate Workflow name * Small tweaks
- Loading branch information
Evan Gibler
authored
Dec 15, 2023
1 parent
48a851e
commit a0b6039
Showing
4 changed files
with
104 additions
and
5 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
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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
on: pull_request | ||
|
||
jobs: | ||
test: | ||
name: Test | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout panther-analysis | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set python version | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.9' | ||
|
||
- name: Install pipenv | ||
run: pip install pipenv | ||
|
||
- name: Install | ||
run: make install | ||
|
||
- name: Setup venv | ||
run: make venv | ||
|
||
- name: make test | ||
run: make test |
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 |
---|---|---|
@@ -0,0 +1,39 @@ | ||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
upload: | ||
name: | ||
runs-on: ubuntu-latest | ||
env: | ||
API_HOST: ${{ secrets.API_HOST }} | ||
API_TOKEN: ${{ secrets.API_TOKEN }} | ||
steps: | ||
- name: Validate Secrets | ||
if: ${{ env.API_HOST == '' || env.API_TOKEN == '' }} | ||
run: | | ||
echo "API_HOST or API_TOKEN not set" | ||
exit 0 | ||
- name: Checkout panther-analysis | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set python version | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.9' | ||
|
||
- name: Install pipenv | ||
run: pip install pipenv | ||
|
||
- name: Install | ||
run: make install | ||
|
||
- name: Setup venv | ||
run: make venv | ||
|
||
- name: upload | ||
run: | | ||
pipenv run panther_analysis_tool upload --api-host ${{ env.API_HOST }} --api-token ${{ env.API_TOKEN }} |
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 |
---|---|---|
@@ -0,0 +1,36 @@ | ||
on: pull_request | ||
|
||
jobs: | ||
validate: | ||
name: Validate | ||
runs-on: ubuntu-latest | ||
env: | ||
API_HOST: ${{ secrets.API_HOST }} | ||
API_TOKEN: ${{ secrets.API_TOKEN }} | ||
steps: | ||
- name: Validate Secrets | ||
if: ${{ env.API_HOST == '' || env.API_TOKEN == '' }} | ||
run: | | ||
echo "API_HOST or API_TOKEN not set" | ||
exit 0 | ||
- name: Checkout panther-analysis | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set python version | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.9' | ||
|
||
- name: Install pipenv | ||
run: pip install pipenv | ||
|
||
- name: Install | ||
run: make install | ||
|
||
- name: Setup venv | ||
run: make venv | ||
|
||
- name: validate | ||
run: | | ||
pipenv run panther_analysis_tool validate --api-host ${{ env.API_HOST }} --api-token ${{ env.API_TOKEN }} |