|
| 1 | +name: CI |
| 2 | + |
| 3 | +on: [push] |
| 4 | + |
| 5 | +jobs: |
| 6 | + js: |
| 7 | + name: Lint and test JavaScript |
| 8 | + runs-on: 'ubuntu-latest' |
| 9 | + steps: |
| 10 | + - uses: actions/checkout@v1 |
| 11 | + - name: Use Node.js 12 |
| 12 | + uses: actions/setup-node@v1 |
| 13 | + with: |
| 14 | + node-version: 12.x |
| 15 | + - name: Install dependencies |
| 16 | + run: npm ci |
| 17 | + - name: Lint source |
| 18 | + run: npm run lint |
| 19 | + - uses: actions/checkout@v1 |
| 20 | + - name: Use Node.js 12 |
| 21 | + uses: actions/setup-node@v1 |
| 22 | + with: |
| 23 | + node-version: 12.x |
| 24 | + - name: Install dependencies |
| 25 | + run: npm ci |
| 26 | + - name: Run tests |
| 27 | + run: npm run test |
| 28 | + - name: Run demo test |
| 29 | + run: npm run test:demo |
| 30 | + build: |
| 31 | + name: Build package |
| 32 | + runs-on: 'ubuntu-latest' |
| 33 | + steps: |
| 34 | + - uses: actions/checkout@v1 |
| 35 | + - name: Use Node.js 12 |
| 36 | + uses: actions/setup-node@v1 |
| 37 | + with: |
| 38 | + node-version: 12.x |
| 39 | + - name: Install dependencies |
| 40 | + run: npm ci |
| 41 | + - name: Set up Python 3.8 |
| 42 | + uses: actions/setup-python@v1 |
| 43 | + with: |
| 44 | + python-version: 3.8 |
| 45 | + - name: Install Dash |
| 46 | + run: pip install dash[dev] |
| 47 | + - name: Build dash-bootstrap-components |
| 48 | + run: npm run build |
| 49 | + - name: Upload generated files |
| 50 | + uses: actions/upload-artifact@v2 |
| 51 | + with: |
| 52 | + name: dash-bootstrap-components |
| 53 | + path: dash_bootstrap_components/_components |
| 54 | + python: |
| 55 | + name: Lint and test Python package |
| 56 | + needs: build |
| 57 | + runs-on: 'ubuntu-latest' |
| 58 | + strategy: |
| 59 | + max-parallel: 4 |
| 60 | + matrix: |
| 61 | + python-version: [2.7, 3.5, 3.6, 3.7, 3.8] |
| 62 | + services: |
| 63 | + hub: |
| 64 | + image: selenium/hub:3.141.59-gold |
| 65 | + firefox: |
| 66 | + image: selenium/node-chrome:3.141.59-gold |
| 67 | + env: |
| 68 | + HUB_HOST: hub |
| 69 | + HUB_PORT: 4444 |
| 70 | + |
| 71 | + steps: |
| 72 | + - uses: actions/checkout@v1 |
| 73 | + - name: Set up Python 3.8 |
| 74 | + uses: actions/setup-python@v1 |
| 75 | + with: |
| 76 | + python-version: 3.8 |
| 77 | + - name: Set up Python ${{ matrix.python-version }} |
| 78 | + if: matrix.python-version != '3.8' |
| 79 | + uses: actions/setup-python@v1 |
| 80 | + with: |
| 81 | + python-version: ${{ matrix.python-version }} |
| 82 | + - name: Install nox |
| 83 | + run: python3.8 -m pip install -U nox |
| 84 | + - name: Lint Python source |
| 85 | + if: matrix.python-version == 3.8 |
| 86 | + run: nox -s lint |
| 87 | + - uses: actions/download-artifact@v2 |
| 88 | + with: |
| 89 | + name: dash-bootstrap-components |
| 90 | + path: dash_bootstrap_components/_components |
| 91 | + - name: Test Python module |
| 92 | + run: nox -s test-${{ matrix.python-version }} |
0 commit comments