Skip to content

Commit

Permalink
chore: test
Browse files Browse the repository at this point in the history
  • Loading branch information
williamfzc committed Nov 21, 2023
1 parent 01c0d54 commit 8dc6863
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 2 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python

name: Smoke Test

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
build:

runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: [ "3.9", "3.10", "3.11" ]

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install pipenv
run: pip install pipenv
- name: Run examples
run: |
pipenv install
pipenv run python3 examples/write.py
pipenv run python3 examples/read.py
2 changes: 1 addition & 1 deletion Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ tqdm = "*"
[dev-packages]

[requires]
python_version = ">=3.7"
python_version = "^3.7"
3 changes: 2 additions & 1 deletion examples/write.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
from srctag.collector import FileLevelEnum, Collector
from srctag.storage import Storage
import os

collector = Collector()
collector.config.repo_root = ".."
collector.config.repo_root = os.path.dirname(os.path.dirname(__file__))
collector.config.file_level = FileLevelEnum.DIR
collector.config.max_depth_limit = 16

Expand Down

0 comments on commit 8dc6863

Please sign in to comment.