Merge pull request #366 from ocavue/ocavue/fix-tox

fix ci by installing tox v3
This commit is contained in:
Alexei Yatskov 2022-12-20 17:03:42 -08:00 committed by GitHub
commit ad4a4a4661
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -57,15 +57,15 @@ jobs:
sudo apt-get install -y pyqt5-dev-tools xvfb jq sudo apt-get install -y pyqt5-dev-tools xvfb jq
- name: Setup Python ${{ matrix.python }} - name: Setup Python ${{ matrix.python }}
uses: actions/setup-python@v2 uses: actions/setup-python@v4
with: with:
python-version: ${{ matrix.python }} python-version: ${{ matrix.python }}
- name: Install tox - name: Install tox
run: pip install tox run: pip install 'tox==3.28.0'
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v2 uses: actions/checkout@v3
- name: Run tests - name: Run tests
run: tox -vvve ${{ matrix.environment }} -- --forked --verbose run: tox -vvve ${{ matrix.environment }} -- --forked --verbose

View File

@ -13,7 +13,7 @@ upload_time=$(curl https://pypi.org/pypi/anki/json \
| jq --arg v "$version" -r '.releases[$v][0].upload_time_iso_8601') | jq --arg v "$version" -r '.releases[$v][0].upload_time_iso_8601')
cutoff_time=$(date --utc -d "$upload_time +1 hour" '+%Y-%m-%dT%H:%M:%S') cutoff_time=$(date --utc -d "$upload_time +1 hour" '+%Y-%m-%dT%H:%M:%S')
coproc SERVER { "$toxworkdir"/.tox/bin/python -um pypi_timemachine "$cutoff_time"; } coproc SERVER { "$toxworkdir"/bin/python -um pypi_timemachine "$cutoff_time"; }
index_url=$(print_first_group '(http\S+)' <&"${SERVER[0]}") index_url=$(print_first_group '(http\S+)' <&"${SERVER[0]}")
python -m pip install --index-url "$index_url" "anki==$version" "$AQT==$version" python -m pip install --index-url "$index_url" "anki==$version" "$AQT==$version"