Skip to content

Commit

Permalink
Fix allow pre-releases for pull requests
Browse files Browse the repository at this point in the history
  • Loading branch information
gregorjerse committed Jan 23, 2025
1 parent 1bde806 commit b696f93
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ jobs:
RESOLWE_POSTGRESQL_PORT: 55433
RESOLWE_REDIS_PORT: 56380
RESOLWE_TEST_ONLY_CHANGES_TO: "origin/master"
TOX_COMMAND: "tox --skip-missing-interpreters false"

strategy:
matrix:
toxenv: ["py312"]
Expand Down Expand Up @@ -66,9 +68,9 @@ jobs:

# NOTE: If we are building the "master" branch or a pull request against the
# "master" branch, we allow installing pre-releases with the pip command.
- name: Allow pre-releases for master branch
if: github.ref == 'refs/heads/master'
run: echo "PIP_PRE=1" >> $GITHUB_ENV
- name: Allow pre-releases for PRs and merges with master branch
if: github.event_name == 'pull_request' || github.ref == 'refs/heads/master'
run: echo "TOX_COMMAND=${{ env.TOX_COMMAND }} --pre" >> $GITHUB_ENV

- name: Assert PR is up-to-date
if: github.event_name == 'pull_request'
Expand All @@ -84,35 +86,35 @@ jobs:
- name: Documentation
run: |
tox -e docs
${{ env.TOX_COMMAND }} -e docs
- name: Linters
run: |
tox -e linters
${{ env.TOX_COMMAND }} -e linters
- name: Packaging
run: |
tox -e packaging
${{ env.TOX_COMMAND }} -e packaging
- name: Extras
run: |
tox -e extra
${{ env.TOX_COMMAND }} -e extra
- name: Migrations
run: |
tox -e migrations
${{ env.TOX_COMMAND }} -e migrations
- name: Run entire test suite
if: github.event_name != 'pull_request'
timeout-minutes: 120
run: |
tox -e ${{ matrix.toxenv }}
${{ env.TOX_COMMAND }} -e ${{ matrix.toxenv }}
- name: Unit partial test suite on pull request
if: github.event_name == 'pull_request'
timeout-minutes: 120
run: |
tox -e ${{ matrix.toxenv }}-partial
${{ env.TOX_COMMAND }} -e ${{ matrix.toxenv }}-partial
build:
runs-on: public-docker-runner
Expand Down

0 comments on commit b696f93

Please sign in to comment.