Skip to content

Commit

Permalink
Update build script
Browse files Browse the repository at this point in the history
  • Loading branch information
w3stling committed Aug 3, 2024
1 parent 32c25fd commit d61c92c
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
pytest -v --doctest-modules --junitxml=junit/test-results.xml --cov=trading_calendar --cov-report=xml --cov-report=html
- name: Upload coverage reports
uses: codecov/codecov-action@v4.5.0
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}

Expand Down
56 changes: 56 additions & 0 deletions .github/workflows/pr-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# This workflow will check pull request and run tests

name: Pull Request Check

on:
pull_request:
branches:
- main

permissions:
checks: write
pull-requests: write

jobs:
build:
name: 🛂 Pull Request Check
timeout-minutes: 20
runs-on: ubuntu-latest

steps:
- name: Checkout repository ⚙️
uses: actions/checkout@v4
with:
# Disabling shallow clone is recommended for improving relevancy of reporting
fetch-depth: 0

- name: Setup Python ⚙️
uses: actions/setup-python@v5
with:
python-version: '3.12'
cache: 'pip' # caching pip dependencies

- name: Display Python version
run: python -c "import sys; print(sys.version)"

- name: Install dependencies ⚙️
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Build and test 🏗️
run: |
pip install httpx pytest pytest-cov coverage codecov
pytest -v --doctest-modules --junitxml=junit/test-results.xml --cov=trading_calendar --cov-report=xml --cov-report=html
- name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
files: |
junit/test-results.xml
- name: Upload coverage reports
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}

0 comments on commit d61c92c

Please sign in to comment.