From 4b5f38fb1b17ef4aeb24293aded4cb047608dee9 Mon Sep 17 00:00:00 2001 From: Phuc Tran Date: Wed, 23 Apr 2025 17:59:23 +0800 Subject: [PATCH 1/3] added a GitHub action to run unit tests automatically on code push --- .github/unittests.yaml | 16 +++++++++++ .idea/.gitignore | 8 ++++++ ...d-automated-tests-off-platform-project.iml | 16 +++++++++++ .idea/inspectionProfiles/Project_Default.xml | 28 +++++++++++++++++++ .../inspectionProfiles/profiles_settings.xml | 6 ++++ .idea/misc.xml | 7 +++++ .idea/modules.xml | 8 ++++++ .idea/vcs.xml | 6 ++++ 8 files changed, 95 insertions(+) create mode 100644 .github/unittests.yaml create mode 100644 .idea/.gitignore create mode 100644 .idea/add-automated-tests-off-platform-project.iml create mode 100644 .idea/inspectionProfiles/Project_Default.xml create mode 100644 .idea/inspectionProfiles/profiles_settings.xml create mode 100644 .idea/misc.xml create mode 100644 .idea/modules.xml create mode 100644 .idea/vcs.xml diff --git a/.github/unittests.yaml b/.github/unittests.yaml new file mode 100644 index 00000000..5ce1afd1 --- /dev/null +++ b/.github/unittests.yaml @@ -0,0 +1,16 @@ +name: Continuous Integration +on: [push] +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: 3.12.0 + architecture: x64 + - name: Install dependencies + run: pip install -r requirements.txt + - name: Run Tests + run: python -m pytest diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 00000000..13566b81 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/.idea/add-automated-tests-off-platform-project.iml b/.idea/add-automated-tests-off-platform-project.iml new file mode 100644 index 00000000..9efb675a --- /dev/null +++ b/.idea/add-automated-tests-off-platform-project.iml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml new file mode 100644 index 00000000..a5614f34 --- /dev/null +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -0,0 +1,28 @@ + + + + \ No newline at end of file diff --git a/.idea/inspectionProfiles/profiles_settings.xml b/.idea/inspectionProfiles/profiles_settings.xml new file mode 100644 index 00000000..105ce2da --- /dev/null +++ b/.idea/inspectionProfiles/profiles_settings.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 00000000..b1920e4a --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 00000000..fa11fef8 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 00000000..35eb1ddf --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file From 816c4e67a8fc7377bbecbfd482a5f54cc294253b Mon Sep 17 00:00:00 2001 From: Phuc Tran Date: Wed, 23 Apr 2025 18:08:34 +0800 Subject: [PATCH 2/3] Add a GitHub action to run unit tests automatically on code push --- .github/{ => workflows}/unittests.yaml | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/{ => workflows}/unittests.yaml (100%) diff --git a/.github/unittests.yaml b/.github/workflows/unittests.yaml similarity index 100% rename from .github/unittests.yaml rename to .github/workflows/unittests.yaml From bb6b509e59d8debeb406bf5bb9204c0ece6d2491 Mon Sep 17 00:00:00 2001 From: Phuc Tran Date: Wed, 23 Apr 2025 18:21:05 +0800 Subject: [PATCH 3/3] Modify the unittest.yaml so that the Continuous Integration will run when push and pull request --- .github/workflows/unittests.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/unittests.yaml b/.github/workflows/unittests.yaml index 5ce1afd1..8b5ddca0 100644 --- a/.github/workflows/unittests.yaml +++ b/.github/workflows/unittests.yaml @@ -1,5 +1,5 @@ name: Continuous Integration -on: [push] +on: [push, pull_request] jobs: build: runs-on: ubuntu-latest