Skip to content

Commit e99b365

Browse files
authored
chore: Fetch GGShield binary from GitHub API (#72)
* rm ggshield binaries * feat: install GGShield executable from latest GitHub release fix(test): mock getGGShieldAbsolutePath in getConfiguration test feat: review: send messages to channel output * feat(test): tests for ggshield-resolver-utils * chore: rename getGGShieldAbsolutePath to getGGShield and fix typos * chore: integration test for getGGShield * chore(ci): run tests on os matrix * feat: fix GGShield version * fix(test): fix paths for scanFile tests for windows * chore: mv .ggshield_version to ggshield_version --------- Co-authored-by: Séverine Bonnechère <[email protected]>
1 parent 0b3e705 commit e99b365

File tree

276 files changed

+1132
-24972
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

276 files changed

+1132
-24972
lines changed

.github/workflows/ci.yaml

Lines changed: 26 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,37 @@ on:
1212

1313
jobs:
1414
build-and-test:
15-
runs-on: ubuntu-latest
15+
runs-on: ${{ matrix.os }}
16+
strategy:
17+
matrix:
18+
os: [ubuntu-latest, macos-latest, windows-latest]
1619

1720
steps:
18-
- name: Checkout code
19-
uses: actions/checkout@v3
21+
- name: 👩‍💻 Checkout code
22+
uses: actions/checkout@v4
2023

21-
- name: Set up Node.js
22-
uses: actions/setup-node@v3
24+
- name: ⚙️ Set up Node.js
25+
uses: actions/setup-node@v4
2326
with:
2427
node-version: "18"
2528

26-
- name: Install dependencies
29+
- name: ⚙️ Install dependencies
2730
run: yarn install
2831

29-
- name: Run tests
30-
run: xvfb-run --auto-servernum yarn test
32+
# We use xvfb-run on Linux to run tests because we need a display.
33+
# xvfb-run is not available on macOS, so we use XQuartz instead.
34+
# The default GitHub Actions runner for Windows (windows-latest) has a GUI session
35+
- name: ⚙️ Install XQuartz on macOS
36+
if: runner.os == 'macOS'
37+
run: brew install xquartz xorg-server
38+
39+
- name: 🧪 Run tests
40+
shell: bash # Ensure bash is used for Linux/macOS
41+
run: |
42+
if [ "$RUNNER_OS" = "Linux" ]; then
43+
xvfb-run --auto-servernum yarn test
44+
elif [ "$RUNNER_OS" = "macOS" ]; then
45+
bash ./scripts/xvfb-run-macos.sh yarn test
46+
else
47+
bash -c "yarn test"
48+
fi

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,7 @@ out/
3838

3939
# cache dir
4040
.cache_ggshield
41-
.vscode-test/
41+
.vscode-test/
42+
43+
# ggshield internal
44+
ggshield-internal/

ggshield-internal/ggshield-arm64-darwin/_internal/attrs-24.2.0.dist-info/METADATA

Lines changed: 0 additions & 242 deletions
This file was deleted.

ggshield-internal/ggshield-arm64-darwin/_internal/attrs-24.2.0.dist-info/RECORD

Lines changed: 0 additions & 35 deletions
This file was deleted.

ggshield-internal/ggshield-arm64-darwin/_internal/attrs-24.2.0.dist-info/WHEEL

Lines changed: 0 additions & 4 deletions
This file was deleted.

ggshield-internal/ggshield-arm64-darwin/_internal/attrs-24.2.0.dist-info/licenses/LICENSE

Lines changed: 0 additions & 21 deletions
This file was deleted.
Binary file not shown.

0 commit comments

Comments
 (0)