Merge pull request #111 from Siege-Software/change-date-parse #181
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| name: "build" | |
| on: # yamllint disable-line rule:truthy | |
| pull_request: | |
| push: | |
| branches: [main] | |
| jobs: | |
| build: | |
| name: Python ${{ matrix.python-version }} | Django ${{ matrix.django-version}} | Ubuntu | |
| runs-on: ubuntu-22.04 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - python-version: "3.10" | |
| django-version: "3.2.*" | |
| - python-version: "3.10" | |
| django-version: "4.0.*" | |
| - python-version: "3.10" | |
| django-version: "4.1.*" | |
| coverage: true | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v2 | |
| - name: Setup Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v1 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install Django ${{ matrix.django-version }} | |
| run: | | |
| pip install Django==${{ matrix.django-version }} | |
| pip install coverage | |
| pip install factory-boy | |
| pip install pytz | |
| pip install typesense | |
| - name: Setup TypeSense | |
| uses: jirevwe/typesense-github-action@v1.0.1 | |
| with: | |
| typesense-version: '27.0' | |
| typesense-api-key: sample_key | |
| - name: Wait for TypeSense to be ready | |
| run: | | |
| echo "Waiting for TypeSense..." | |
| for i in {1..30}; do | |
| if curl -s http://localhost:8108/health | grep '"ok"' > /dev/null; then | |
| echo "TypeSense is ready!" | |
| exit 0 | |
| fi | |
| sleep 2 | |
| done | |
| echo "TypeSense failed to start" | |
| exit 1 | |
| - name: Run tests | |
| run: | | |
| coverage run runtests.py | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v3 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} |