Skip to content

Commit

Permalink
Update action versions and implement checkout of fork for tests (#146)
Browse files Browse the repository at this point in the history
  • Loading branch information
nils-herrmann authored Jun 19, 2024
1 parent 6dcb217 commit 0d7e680
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions .github/workflows/test-and-build-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,13 @@ jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: 3.8
- name: Install dependencies
Expand All @@ -25,14 +29,18 @@ jobs:
- name: Run tests
run: pytest --cov=pubmed_parser tests/ --verbose
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@v4

docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.ref || github.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name || github.repository }}
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: 3.8
- name: Install dependencies
Expand All @@ -48,7 +56,7 @@ jobs:
make html
touch _build/html/.nojekyll
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/_build/html/
Expand Down
Empty file added tests/__init__.py
Empty file.

0 comments on commit 0d7e680

Please sign in to comment.