Skip to content

Commit

Permalink
test: include python
Browse files Browse the repository at this point in the history
  • Loading branch information
jjjermiah committed Feb 3, 2024
1 parent b44996b commit 9ad2cd6
Showing 1 changed file with 38 additions and 26 deletions.
64 changes: 38 additions & 26 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,33 +65,7 @@ jobs:
# verbose: true
# name: codecov-umbrella

Update-README:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Update README code block
run: |
awk '/``` bash NBIAToolkit-Output/ {
print "``` bash NBIAToolkit-Output";
print "> NBIAToolkit --version";
system("NBIAToolkit --version");
f=1;
next
} f && /```/ {
print "```";
f=0;
next
} !f' README.md > temp && mv temp README.md

- name: Commit and push changes
run: |
git config --global user.name 'jjjermiah'
git config --global user.email 'jjjermiah@users.noreply.github.com'
git add README.md
git commit -m "Update README with latest version"
git push

# Continuous-Deployment:
# permissions:
Expand Down Expand Up @@ -279,3 +253,41 @@ jobs:
# docker run --rm \
# ${{ secrets.DOCKERHUB_USERNAME }}/nbiatoolkit:latest \
# NBIAToolkit

Update-README:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3

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

- name: Install using PyPi
run: |
pip install nbiatoolkit;
NBIAToolkit
- name: Update README code block
run: |
awk '/``` bash NBIAToolkit-Output/ {
print "``` bash NBIAToolkit-Output";
print "> NBIAToolkit --version";
system("NBIAToolkit --version");
f=1;
next
} f && /```/ {
print "```";
f=0;
next
} !f' README.md > temp && mv temp README.md
- name: Commit and push changes
run: |
git config --global user.name 'jjjermiah'
git config --global user.email 'jjjermiah@users.noreply.github.com'
git add README.md
git commit -m "Update README with latest version"
git push

0 comments on commit 9ad2cd6

Please sign in to comment.