Skip to content

Commit

Permalink
Testing a new type of CI_CD workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
moe-ad committed Nov 3, 2024
1 parent c1eb94d commit fa1bea6
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 6 deletions.
35 changes: 29 additions & 6 deletions .github/workflows/hello-world.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,32 @@
#name: hello-world
#on: push
#jobs:
# hello-world-job:
# runs-on: ubuntu-latest
# steps:
# - name: Check out repository code
# uses: actions/checkout@v4
# - run: echo "$(cat hello_world.txt)"

name: hello-world
on: push
jobs:
hello-world-job:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v4
- run: echo "$(cat hello_world.txt)"
upload-sample-file:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: '3.13'
- name: Install dependencies
run: pip install -r requirements.txt
- name: Run script
working-directory: ./src
run: python create_file.py
- name: Upload sample file
uses: actions/upload-artifact@v4
with:
name: sample-file
path: ./output_files/sample_file.txt
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
requests=2.32.3
4 changes: 4 additions & 0 deletions src/create_file.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# This is a test script that creates a file which I can then upload as artifact on Github

with open('../output_files/sample_file.txt', mode='w') as w:
w.write('My name is Moe\nI just started as an employee at Ansys')

0 comments on commit fa1bea6

Please sign in to comment.