File tree Expand file tree Collapse file tree 3 files changed +10
-25
lines changed Expand file tree Collapse file tree 3 files changed +10
-25
lines changed Original file line number Diff line number Diff line change @@ -21,14 +21,11 @@ jobs:
2121        with :
2222          python-version : ${{ matrix.python-version }} 
2323
24-       - name : Install dependencies 
24+       - name : Install dependencies and run CI  
2525        run : | 
2626          python -m pip install --upgrade pip 
27-           pip install pytest 
28-           pip install -e . 
29- 
30- name : Run tests 
31-         run : pytest 
27+           pip install build twine pytest pytest-cov setuptools_scm 
28+           make ci 
3229
3330publish :
3431    needs : test 
@@ -41,23 +38,16 @@ jobs:
4138        with :
4239          python-version : ' 3.x' 
4340
44-       - name : Install build tools 
45-         run : | 
46-           python -m pip install --upgrade pip 
47-           pip install build twine 
48- 
4941      - name : Verify tag version matches package version 
5042        run : | 
51-           PACKAGE_VERSION=$(python setup.py --version) 
52-           TAG_VERSION=${GITHUB_REF#refs/tags/v} 
43+           pip install setuptools_scm twine 
44+           PACKAGE_VERSION=$(python -m setuptools_scm) 
45+           TAG_VERSION=${GITHUB_REF#refs/tags/}  # Remove 'refs/tags/' prefix 
5346          if [ "$PACKAGE_VERSION" != "$TAG_VERSION" ]; then 
5447            echo "Package version ($PACKAGE_VERSION) does not match tag version ($TAG_VERSION)" 
5548            exit 1 
5649          fi 
5750
58- name : Build package 
59-         run : python -m build 
60- 
6151name : Publish to TestPyPI 
6252        if : contains(github.ref, 'test') 
6353        env :
Original file line number Diff line number Diff line change 1212    runs-on : windows-latest 
1313    strategy :
1414      matrix :
15-         python-version : ['3.11', '3. 12'] 
15+         python-version : ['3.12'] 
1616        architecture : ['x64'] 
1717
1818    steps :
@@ -32,16 +32,10 @@ jobs:
3232        run : | 
3333          python -m pip install --upgrade pip 
3434          pip install pytest pytest-cov 
35-           pip install -e . 
3635
3736name : Run tests 
3837        run : | 
39-           pytest --cov=cedarscript_ast_parser tests/ 
40- name : Test PyPI installation 
41-         run : | 
42-           pip uninstall cedarscript-ast-parser -y 
43-           pip install cedarscript-ast-parser 
44-           python -c "from cedarscript_ast_parser import CEDARScriptASTParser; CEDARScriptASTParser()" 
38+           make ci 
4539
4640#  Optional: Upload artifacts if your package generates any
4741      - name : Upload artifacts 
Original file line number Diff line number Diff line change 11.PHONY : all dist d clean c version v install i test t build b
22
3- all : clean install test build version
3+ ci : clean install test build
4+ all : ci version
45
56dist  d : all
67	scripts/check-version.sh
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments