CI #764
This file contains 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: CI | |
on: | |
push: | |
pull_request: | |
schedule: | |
- cron: '0 23 * * *' | |
workflow_dispatch: | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
run-action: | |
name: Test | |
runs-on: ubuntu-latest | |
services: | |
elasticsearch: | |
image: elasticsearch:7.5.0 | |
ports: | |
- 9200/tcp | |
options: -e="discovery.type=single-node" --health-cmd="curl http://localhost:9200/_cluster/health" --health-interval=10s --health-timeout=5s --health-retries=10 | |
strategy: | |
matrix: | |
python-version: [3.7, 3.8, 3.9] | |
fail-fast: false | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v1 | |
- name: Elasticsearch is reachable | |
run: | | |
curl --verbose --show-error http://localhost:${{ job.services.elasticsearch.ports[9200] }} | |
- uses: actions/checkout@master | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v1 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install tox | |
run: pip install tox | |
- name: Test with tox ${{ matrix.env.TOXENV }} | |
env: | |
ELASTICSEARCH_URL: "127.0.0.1:${{ job.services.elasticsearch.ports[9200] }}" | |
run: tox -e github | |
- uses: codecov/codecov-action@v2 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
fail_ci_if_error: false |