Skip to content

Commit

Permalink
⚙ GitHub Actions: Call test workflow when (before) deploying
Browse files Browse the repository at this point in the history
  • Loading branch information
mikegerber committed Aug 4, 2023
1 parent 0319d08 commit 1026152
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ env:
PYPI_URL: https://pypi.org/p/dinglehopper

jobs:
test:
uses: ./.github/workflows/test.yml

build:
needs: test
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand All @@ -27,8 +31,6 @@ jobs:
run: .github/workflows/release-check-version-tag
- name: Build package
run: python3 -m pip install --upgrade build && python3 -m build
- name: Test
run: python3 -m pip install -r requirements-dev.txt && pytest
- name: Upload dist
uses: actions/upload-artifact@v3
with:
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
name: test

on:

push:
branches:
- master

schedule:
- cron: "00 16 07 * *" # = monthly

# Allow manually running (from GitHub Web)
workflow_dispatch:

# Allow calling this workflow (e.g. from release workflow)
workflow_call:

jobs:
test:

Expand Down

0 comments on commit 1026152

Please sign in to comment.