12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- name: command line
- on:
- push:
- branches:
- - master
- pull_request:
- jobs:
- test:
- name: cli test
- runs-on: ubuntu-20.04
- timeout-minutes: 10
- steps:
- - uses: actions/checkout@v2
- - name: Check for python file changes
- uses: getsentry/paths-filter@v2
- id: changes
- with:
- token: ${{ github.token }}
- filters: .github/file-filters.yml
- - name: Set python version output
- id: python-version
- run: |
- echo "::set-output name=python-version::$(cat .python-version)"
- # Until GH composite actions can use `uses`, we need to setup python here
- - uses: actions/setup-python@v2
- if: steps.changes.outputs.backend == 'true'
- with:
- python-version: ${{ steps.python-version.outputs.python-version }}
- - name: Setup pip
- uses: ./.github/actions/setup-pip
- id: pip
- if: steps.changes.outputs.backend == 'true'
- - name: pip cache
- uses: actions/cache@v2
- if: steps.changes.outputs.backend == 'true'
- with:
- path: ${{ steps.pip.outputs.pip-cache-dir }}
- key: |
- ${{ runner.os }}-py${{ steps.python-version.outputs.python-version }}-pip${{ steps.pip.outputs.pip-version }}-${{ secrets.PIP_CACHE_VERSION }}-${{ hashFiles('requirements-*.txt', '!requirements-pre-commit.txt') }}
- - name: Setup sentry env
- uses: ./.github/actions/setup-sentry
- id: setup
- if: steps.changes.outputs.backend == 'true'
- - name: Run test
- if: steps.changes.outputs.backend == 'true'
- run: |
- make test-cli
- - name: Handle artifacts
- uses: ./.github/actions/artifacts
|