Skip to content

Commit 5c23ef9

Browse files
committed
ci(github): Run scanner funTests in Docker to avoid installing tools
Signed-off-by: Sebastian Schuberth <[email protected]>
1 parent 63677a8 commit 5c23ef9

File tree

1 file changed

+2
-22
lines changed

1 file changed

+2
-22
lines changed

.github/workflows/build-and-test.yml

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -85,30 +85,10 @@ jobs:
8585
steps:
8686
- name: Checkout Repository
8787
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
88-
- name: Set tool version environment variables
89-
run: sed "s/^ARG //" docker/versions.dockerfile >> $GITHUB_ENV
90-
- name: Install required tools
91-
run: |
92-
# Install git-repo.
93-
mkdir -p $HOME/.local/bin
94-
curl https://storage.googleapis.com/git-repo-downloads/repo -o $HOME/.local/bin/repo
95-
chmod a+x $HOME/.local/bin/repo
96-
97-
# Install Askalono for functional tests.
98-
curl -LOs https://github.com/amzn/askalono/releases/download/$ASKALONO_VERSION/askalono-Linux.zip
99-
unzip askalono-Linux.zip -d $HOME/.local/bin
100-
101-
# Install Licensee for functional tests.
102-
echo "gem: --bindir $HOME/.local/bin" > $HOME/.gemrc
103-
gem install --user-install licensee -v $LICENSEE_VERSION
104-
105-
# Install ScanCode for license texts.
106-
curl -Os https://raw.githubusercontent.com/nexB/scancode-toolkit/v$SCANCODE_VERSION/requirements.txt
107-
pipx install --pip-args="--no-cache-dir --constraint requirements.txt" scancode-toolkit==$SCANCODE_VERSION
10888
- name: Setup Gradle
10989
uses: gradle/actions/setup-gradle@ac638b010cf58a27ee6c972d7336334ccaf61c96 # v4
11090
- name: Run functional tests that do not require external tools
111-
run: ./gradlew --scan -Ptests.exclude=org.ossreviewtoolkit.plugins.packagemanagers.* funTest jacocoFunTestReport
91+
run: ./gradlew --scan -Ptests.exclude=org.ossreviewtoolkit.plugins.packagemanagers.*,org.ossreviewtoolkit.plugins.scanners.* funTest jacocoFunTestReport
11292
- name: Create Test Summary
11393
uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2
11494
with:
@@ -153,7 +133,7 @@ jobs:
153133
-e HOME=/home/runner \
154134
-e GRADLE_OPTS="$GRADLE_OPTS" \
155135
${{ env.TEST_IMAGE_TAG }} \
156-
-c "./gradlew --scan -Ptests.include=org.ossreviewtoolkit.plugins.packagemanagers.* funTest jacocoFunTestReport"
136+
-c "./gradlew --scan -Ptests.include=org.ossreviewtoolkit.plugins.packagemanagers.*,org.ossreviewtoolkit.plugins.scanners.* funTest jacocoFunTestReport"
157137
- name: Create Test Summary
158138
uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2
159139
with:

0 commit comments

Comments
 (0)