Skip to content

Commit

Permalink
feat: support testing on macos
Browse files Browse the repository at this point in the history
  • Loading branch information
shenxianpeng committed Jan 4, 2025
1 parent cefc22c commit f785b20
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,43 @@ jobs:
name: gitstats-report-windows
path: gitstats-report-windows

test-macos:
runs-on: macos-latest
strategy:
matrix:
python-version: ["3.9"] # just test on one version to save time

steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
fetch-depth: 0 # get all history.

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install gnuplot
run: homebrew install gnuplot

- name: Generate GitStats Report
run: |
gnuplot --version
python3 -m venv venv
source venv/bin/activate
# for testing
pip install .
gitstats . gitstats-report-macos
- name: Save GitStats Report
if: ${{ matrix.python-version == '3.9' }}
uses: actions/upload-artifact@v4
with:
name: gitstats-report-macos
path: gitstats-report-macos

test-linux:
runs-on: ubuntu-latest
strategy:
Expand Down

0 comments on commit f785b20

Please sign in to comment.