|
| 1 | +name: CI |
| 2 | +on: [push, pull_request] |
| 3 | +jobs: |
| 4 | + test: |
| 5 | + strategy: |
| 6 | + matrix: |
| 7 | + include: |
| 8 | + - name: Tests |
| 9 | + command: bin/tests --postgresql-host localhost |
| 10 | + - name: Lint |
| 11 | + command: make lint BINDIR="$(dirname $(which python))" |
| 12 | + - name: Documentation |
| 13 | + command: make docs BINDIR="$(dirname $(which python))" |
| 14 | + - name: Dependencies |
| 15 | + command: make github-actions-deps BINDIR="$(dirname $(which python))" |
| 16 | + - name: Licenses |
| 17 | + command: make licenses BINDIR="$(dirname $(which python))" |
| 18 | + - name: Translations |
| 19 | + command: make translations BINDIR="$(dirname $(which python))" |
| 20 | + - name: Static Tests |
| 21 | + command: bin/static_tests |
| 22 | + - name: Static Pipeline |
| 23 | + command: bin/static_pipeline |
| 24 | + runs-on: ubuntu-latest |
| 25 | + services: |
| 26 | + postgres: |
| 27 | + image: postgres:10.1 |
| 28 | + ports: |
| 29 | + - 5432:5432 |
| 30 | + name: ${{ matrix.name }} |
| 31 | + steps: |
| 32 | + - name: Check out repository |
| 33 | + uses: actions/checkout@v2 |
| 34 | + - name: Install platform dependencies |
| 35 | + run: sudo apt -y install libcurl4-openssl-dev libssl-dev pkg-config |
| 36 | + - uses: actions/setup-python@v2 |
| 37 | + with: |
| 38 | + python-version: 3.8.2 |
| 39 | + - name: Cache Python dependencies |
| 40 | + uses: actions/cache@v2 |
| 41 | + env: |
| 42 | + cache-name: warehouse-cache-pip |
| 43 | + with: |
| 44 | + path: ~/.cache/pip |
| 45 | + key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('requirements.txt', 'requirements/*.txt') }} |
| 46 | + restore-keys: | |
| 47 | + ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}- |
| 48 | + ${{ runner.os }}-${{ github.job }}- |
| 49 | + ${{ runner.os }}- |
| 50 | + - name: Install Python dependencies |
| 51 | + run: | |
| 52 | + pip install -U pip setuptools wheel |
| 53 | + pip install -r requirements.txt |
| 54 | + pip install -r requirements/dev.txt |
| 55 | + - uses: actions/setup-node@v2 |
| 56 | + with: |
| 57 | + node-version: 14.4.0 |
| 58 | + - name: Cache Node dependencies |
| 59 | + uses: actions/cache@v2 |
| 60 | + env: |
| 61 | + cache-name: warehouse-cache-npm |
| 62 | + with: |
| 63 | + path: ~/.npm |
| 64 | + key: ${{ runner.os }}-build-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} |
| 65 | + restore-keys: | |
| 66 | + ${{ runner.os }}-build-${{ github.job }}-${{ env.cache-name }}- |
| 67 | + ${{ runner.os }}-build-${{ github.job }}- |
| 68 | + ${{ runner.os }}-build- |
| 69 | + ${{ runner.os }}- |
| 70 | + - name: Install Node dependencies |
| 71 | + run: npm ci |
| 72 | + - name: Run ${{ matrix.name }} |
| 73 | + run: ${{ matrix.command }} |
0 commit comments