-
Notifications
You must be signed in to change notification settings - Fork 5
51 lines (49 loc) · 1.68 KB
/
test.yml
File metadata and controls
51 lines (49 loc) · 1.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: tests
on:
push:
branches-ignore: [main]
workflow_dispatch:
jobs:
linux-unit-tests:
strategy:
matrix:
node: [10, 12, 14, 16]
fail-fast: false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node_version }}
cache: npm
- name: Cache node modules
id: cache-nodemodules
uses: actions/cache@v3
env:
cache-name: cache-node-modules
with:
path: "**/node_modules"
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
- name: Install oasdiff
run: |
# Use the official install script
curl -fsSL https://raw.githubusercontent.com/oasdiff/oasdiff/main/install.sh | sh
# Check where oasdiff was actually installed
which oasdiff || echo "oasdiff not in PATH, checking local directories..."
ls -la ./
ls -la bin/ 2>/dev/null || echo "No bin/ directory"
ls -la ./bin/ 2>/dev/null || echo "No ./bin/ directory"
# Try to find where the binary actually is
find . -name "oasdiff" -type f 2>/dev/null || echo "Binary not found in current directory"
# If it's not already in PATH, try to find and move it
if ! which oasdiff; then
if [ -f "./oasdiff" ]; then
sudo mv ./oasdiff /usr/local/bin/
fi
fi
# Verify installation
oasdiff --version
- run: npm ci
if: ${{ steps.cache-nodemodules.outputs.cache-hit != 'true' }}
- run: npm run compile
- run: npm run test:ci