Skip to content

Commit

Permalink
CI improvement and clean up (#410)
Browse files Browse the repository at this point in the history
The test on multiple python versions is useless since the nightly test is inside the container which as one specific python version.
Also, use the new actions for python setup and dependencies cache.
  • Loading branch information
unkcpz authored Dec 8, 2022
1 parent 97f7b83 commit 7a8c768
Showing 1 changed file with 18 additions and 15 deletions.
33 changes: 18 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,18 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Setup Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: '3.10'
cache: pip
cache-dependency-path: |
.pre-commit-config.yaml
**/setup.cfg
**/pyproject.toml
**/requirements*.txt
- uses: pre-commit/[email protected]

Expand All @@ -30,8 +36,7 @@ jobs:
matrix:
tag: [latest]
browser: [Chrome, Firefox]
python-version: ['3.8', '3.10']
firefox: ['96.0']
python-version: ['3.10']
fail-fast: false

runs-on: ubuntu-latest
Expand All @@ -40,19 +45,17 @@ jobs:
steps:

- name: Check out app
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Cache Python dependencies
uses: actions/cache@v1
with:
path: ~/.cache/pip
key: pip-${{ matrix.python-version }}-tests-${{ hashFiles('**/setup.json') }}
restore-keys: pip-${{ matrix.python-version }}-tests

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: pip
cache-dependency-path: |
**/setup.cfg
**/pyproject.toml
**/requirements*.txt
- name: Install dependencies for test
run: |
Expand All @@ -66,7 +69,7 @@ jobs:
- name: Install Firefox
uses: browser-actions/setup-firefox@latest
with:
firefox-version: ${{ matrix.firefox }}
firefox-version: '96.0'
if: matrix.browser == 'Firefox'

- name: Install geckodriver
Expand Down

0 comments on commit 7a8c768

Please sign in to comment.