Skip to content

Commit a9935d0

Browse files
committed
env cleanup
1 parent a4e7b81 commit a9935d0

File tree

5 files changed

+14
-28
lines changed

5 files changed

+14
-28
lines changed

.github/workflows/container-local-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ jobs:
9191
docker image ls -a
9292
docker run ${{ env.IMAGE_NAME }} version
9393
docker run ${{ env.IMAGE_NAME }} utils fast
94-
docker run -e SCANOSS_API_KEY=${{ secrets.SC_API_KEY }} -v "$(pwd)":"/scanoss" ${{ env.IMAGE_NAME }} scan -o results.json tests
94+
docker run -e SCANOSS_API_KEY="${{ secrets.SC_API_KEY }}" -v "$(pwd)":"/scanoss" ${{ env.IMAGE_NAME }} scan -o results.json tests
9595
id_count=$(cat results.json | grep '"id":' | wc -l)
9696
echo "ID Count: $id_count"
9797
if [[ $id_count -lt 1 ]]; then

.github/workflows/container-publish-ghcr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ jobs:
130130
docker pull ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
131131
docker run ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} version
132132
docker run ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} utils fast
133-
docker run -e SCANOSS_API_KEY=${{ secrets.SC_API_KEY }} -v "$(pwd)":"/scanoss" ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} scan -o results.json tests
133+
docker run -e SCANOSS_API_KEY="${{ secrets.SC_API_KEY }}" -v "$(pwd)":"/scanoss" ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} scan -o results.json tests
134134
id_count=$(cat results.json | grep '"id":' | wc -l)
135135
echo "ID Count: $id_count"
136136
if [[ $id_count -lt 1 ]]; then

.github/workflows/python-local-test.yml

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ on:
1313
permissions:
1414
contents: read
1515

16+
env:
17+
SCANOSS_API_KEY: ${{ secrets.SC_API_KEY }}
18+
1619
jobs:
1720
build:
1821
runs-on: ubuntu-latest
@@ -46,8 +49,6 @@ jobs:
4649
which scanoss-py
4750
4851
- name: Run Tests
49-
env:
50-
SCANOSS_API_KEY: ${{ secrets.SC_API_KEY }}
5152
run: |
5253
which scanoss-py
5354
scanoss-py version
@@ -59,11 +60,8 @@ jobs:
5960
echo "Error: Scan test did not produce any results. Failing"
6061
exit 1
6162
fi
62-
env:
63-
SCANOSS_API_KEY: ${{ secrets.SC_API_KEY }}
63+
6464
- name: Run Tests (fast winnowing)
65-
env:
66-
SCANOSS_API_KEY: ${{ secrets.SC_API_KEY }}
6765
run: |
6866
pip install scanoss_winnowing
6967
which scanoss-py
@@ -76,12 +74,9 @@ jobs:
7674
echo "Error: Scan test did not produce any results. Failing"
7775
exit 1
7876
fi
79-
env:
80-
SCANOSS_API_KEY: ${{ secrets.SC_API_KEY }}
77+
8178

8279
- name: Run Tests HPSM (fast winnowing)
83-
env:
84-
SCANOSS_API_KEY: ${{ secrets.SC_API_KEY }}
8580
run: |
8681
pip install scanoss_winnowing
8782
which scanoss-py
@@ -94,12 +89,9 @@ jobs:
9489
echo "Error: WFP test did not produce any results. Failing"
9590
exit 1
9691
fi
97-
env:
98-
SCANOSS_API_KEY: ${{ secrets.SC_API_KEY }}
92+
9993

10094
- name: Run Unit Tests
101-
env:
102-
SCANOSS_API_KEY: ${{ secrets.SC_API_KEY }}
10395
run: |
10496
python -m unittest
10597

.github/workflows/python-publish-pypi.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ on:
77
tags:
88
- "v*.*.*"
99

10+
env:
11+
SCANOSS_API_KEY: ${{ secrets.SC_API_KEY }}
12+
1013
jobs:
1114
deploy:
1215
runs-on: ubuntu-latest
@@ -33,8 +36,6 @@ jobs:
3336
which scanoss-py
3437
3538
- name: Run Local Tests
36-
env:
37-
SCANOSS_API_KEY: ${{ secrets.SC_API_KEY }}
3839
run: |
3940
which scanoss-py
4041
scanoss-py version
@@ -90,8 +91,6 @@ jobs:
9091
which scanoss-py
9192
9293
- name: Run Tests
93-
env:
94-
SCANOSS_API_KEY: ${{ secrets.SC_API_KEY }}
9594
run: |
9695
which scanoss-py
9796
scanoss-py version
@@ -105,8 +104,6 @@ jobs:
105104
fi
106105
107106
- name: Run Tests (fast winnowing)
108-
env:
109-
SCANOSS_API_KEY: ${{ secrets.SC_API_KEY }}
110107
run: |
111108
pip install scanoss_winnowing
112109
which scanoss-py

.github/workflows/python-publish-testpypi.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ on: [workflow_dispatch]
66
permissions:
77
contents: read
88

9+
env:
10+
SCANOSS_API_KEY: ${{ secrets.SC_API_KEY }}
11+
912
jobs:
1013
deploy:
1114
runs-on: ubuntu-latest
@@ -34,8 +37,6 @@ jobs:
3437
which scanoss-py
3538
3639
- name: Run Local Tests
37-
env:
38-
SCANOSS_API_KEY: ${{ secrets.SC_API_KEY }}
3940
run: |
4041
which scanoss-py
4142
scanoss-py version
@@ -78,8 +79,6 @@ jobs:
7879
which scanoss-py
7980
8081
- name: Run Tests
81-
env:
82-
SCANOSS_API_KEY: ${{ secrets.SC_API_KEY }}
8382
run: |
8483
which scanoss-py
8584
scanoss-py version
@@ -93,8 +92,6 @@ jobs:
9392
fi
9493
9594
- name: Run Tests (fast winnowing)
96-
env:
97-
SCANOSS_API_KEY: ${{ secrets.SC_API_KEY }}
9895
run: |
9996
pip install scanoss_winnowing
10097
which scanoss-py

0 commit comments

Comments
 (0)