-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from WaseemSabir/waseemsabir/add-workflow
Add workflow to run tests
- Loading branch information
Showing
1 changed file
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: Run tests | ||
|
||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
paths: | ||
- 'firestore_size/**' | ||
- 'tests/**' | ||
push: | ||
branches: | ||
- master | ||
paths: | ||
- 'firestore_size/**' | ||
- 'tests/**' | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python 3.8 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.8' | ||
- uses: actions/cache@v3 | ||
id: cache | ||
with: | ||
path: ${{ env.pythonLocation }} | ||
# if requirements or requirements_test changes, cache will be rebuilt | ||
key: ${{ hashFiles('**/requirements*.txt') }} | ||
- name: Install dependencies | ||
# reinstall requirements on cache miss | ||
if: steps.cache.outputs.cache-hit != 'true' | ||
run: pip install -r requirements.txt | ||
- name: Run Test | ||
run: python3 setup.py pytest |