Skip to content

Commit

Permalink
ENH: Add initial prototype for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
khalford committed Oct 1, 2024
1 parent 8102649 commit c060afc
Show file tree
Hide file tree
Showing 6 changed files with 58 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/workflow.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Integration Test
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- name: Self test
id: selftest
uses: khalford/check-version-action@main
with:
path: "version.txt"
- name: Check outputs and modified files
run: |
echo "${{ steps.selftest.outputs.updated }}"
5 changes: 5 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FROM python:3
WORKDIR /app
COPY . .
RUN pip instal -r requirements.txt
CMD ["main.py"]
19 changes: 19 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: 'Check Semver Version Number'
description: 'Check if the semver version number has changed from the main branch.'
inputs:
path:
required: true
default: './version.txt'
fail_on_check:
required: true
default: true
comment_on_fail:
required: true
default: true
outputs:
updated:
description: 'If the version was updated or not.'

runs:
using: 'docker'
image: 'Dockerfile'
18 changes: 18 additions & 0 deletions main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import os
from pathlib import Path


ROOT_PATH = Path(os.environ.get('GITHUB_WORKSPACE'))
MAIN_PATH = ROOT_PATH / "main"
BRANCH_PATH = ROOT_PATH / "branch"
INPUT_PATH = Path(os.environ.get('INPUT_PATH'))

def get_file_contents():
print(os.listdir(ROOT_PATH))





if __name__ == '__main__':
get_file_contents()
Empty file added requirements.txt
Empty file.
1 change: 1 addition & 0 deletions version.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.1.0

0 comments on commit c060afc

Please sign in to comment.