|
| 1 | +name: Test |
| 2 | +on: [push, pull_request] |
| 3 | + |
| 4 | +jobs: |
| 5 | + Linux: |
| 6 | + name: Test on Linux |
| 7 | + runs-on: ubuntu-latest |
| 8 | + strategy: |
| 9 | + matrix: |
| 10 | + node: [10, 12, 14] |
| 11 | + steps: |
| 12 | + - uses: actions/setup-node@v1 |
| 13 | + with: |
| 14 | + node-version: ${{ matrix.node }} |
| 15 | + - uses: actions/checkout@v2 |
| 16 | + - name: Install Dependencies |
| 17 | + run: | |
| 18 | + sudo apt update |
| 19 | + sudo apt install -y libcairo2-dev libjpeg8-dev libpango1.0-dev libgif-dev librsvg2-dev |
| 20 | + - name: Install |
| 21 | + run: npm install --build-from-source |
| 22 | + - name: Test |
| 23 | + run: npm test |
| 24 | + |
| 25 | + Windows: |
| 26 | + name: Test on Windows |
| 27 | + runs-on: windows-latest |
| 28 | + strategy: |
| 29 | + matrix: |
| 30 | + node: [10, 12, 14] |
| 31 | + steps: |
| 32 | + - uses: actions/setup-node@v1 |
| 33 | + with: |
| 34 | + node-version: ${{ matrix.node }} |
| 35 | + - uses: actions/checkout@v2 |
| 36 | + - name: Install Dependencies |
| 37 | + run: | |
| 38 | + Invoke-WebRequest "http://ftp.gnome.org/pub/GNOME/binaries/win64/gtk+/2.22/gtk+-bundle_2.22.1-20101229_win64.zip" -OutFile "gtk.zip" |
| 39 | + Expand-Archive gtk.zip -DestinationPath "C:\GTK" |
| 40 | + Invoke-WebRequest "https://downloads.sourceforge.net/project/libjpeg-turbo/2.0.4/libjpeg-turbo-2.0.4-vc64.exe" -OutFile "libjpeg.exe" -UserAgent NativeHost |
| 41 | + .\libjpeg.exe /S |
| 42 | + - name: Install |
| 43 | + run: npm install --build-from-source |
| 44 | + - name: Test |
| 45 | + run: npm test |
| 46 | + |
| 47 | + macOS: |
| 48 | + name: Test on macOS |
| 49 | + runs-on: macos-latest |
| 50 | + strategy: |
| 51 | + matrix: |
| 52 | + node: [10, 12, 14] |
| 53 | + steps: |
| 54 | + - uses: actions/setup-node@v1 |
| 55 | + with: |
| 56 | + node-version: ${{ matrix.node }} |
| 57 | + - uses: actions/checkout@v2 |
| 58 | + - name: Install Dependencies |
| 59 | + run: | |
| 60 | + brew update |
| 61 | + brew install pkg-config cairo pango libpng jpeg giflib librsvg |
| 62 | + - name: Install |
| 63 | + run: npm install --build-from-source |
| 64 | + - name: Test |
| 65 | + run: npm test |
| 66 | + |
| 67 | + Lint: |
| 68 | + name: Lint |
| 69 | + runs-on: ubuntu-latest |
| 70 | + steps: |
| 71 | + - uses: actions/setup-node@v1 |
| 72 | + with: |
| 73 | + node-version: 12 |
| 74 | + - uses: actions/checkout@v2 |
| 75 | + - name: Install |
| 76 | + run: npm install --ignore-scripts |
| 77 | + - name: Lint |
| 78 | + run: npm run lint |
| 79 | + - name: Lint Types |
| 80 | + run: npm run dtslint |
0 commit comments