Skip to content

Commit

Permalink
Merge pull request #19 from Chisanan232/develop
Browse files Browse the repository at this point in the history
🤖🛠⚙️ [Major Change] Update the documentation and README.
  • Loading branch information
Chisanan232 authored May 25, 2022
2 parents 5d06114 + 17f4173 commit e8734e7
Show file tree
Hide file tree
Showing 52 changed files with 4,567 additions and 1,505 deletions.
256 changes: 205 additions & 51 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,22 @@ commands:
- unit-test-persistence-cases


get_integration_test_cases:
steps:
- run:
name: Get all the unit test persistence cases (file paths)
shell: powershell.exe
command: |
choco install jq
mkdir -p workspace
bash scripts/get-integration-test-paths.sh windows > workspace/integration-test-cases
- persist_to_workspace:
root: workspace
paths:
- integration-test-cases


install_python_dependecies:
steps:
- run:
Expand Down Expand Up @@ -296,26 +312,72 @@ commands:
- .coverage.unit-test-persistence.windows.*


report_testing_coverage:
run_pytest_with_integration_test:
steps:
- attach_workspace:
at: /workspace

# - run:
# name: Get the test cases (file paths)
# shell: powershell.exe
# command: |
# ./workspace/unit-test-persistence-cases > $env:Unit_Test_Persistence
## Set-Variable -Name $env:APPDATA -Value D:\

- run:
name: Combine all coverage results
name: Run PyTest command to test
shell: powershell.exe
command: |
coverage combine .coverage.unit-test*
bash scripts/windows/run_pytest_with_test_cases.sh ./workspace/integration-test-cases
# pytest $Unit_Test_Persistence

- run:
name: Report testing coverage of project code
name: Upload the coverage result to Circle-CI workspace
shell: powershell.exe
command: |
coverage report -m
python -V > $Python_Version
Move-Item -Path .coverage -Destination workspace/.coverage.integration-test.windows.$Python_Version
- persist_to_workspace:
root: workspace
paths:
- .coverage.integration-test.windows.*


report_unit_testing_coverage:
steps:
- attach_workspace:
at: /workspace
- run:
name: Combine all coverage results
shell: powershell.exe
command: coverage combine .coverage.unit-test*

- run:
name: Report testing coverage of project code
shell: powershell.exe
command: coverage report -m


report_integration_testing_coverage:
steps:
- attach_workspace:
at: /workspace
- run:
name: Combine all coverage results
shell: powershell.exe
command: coverage combine .coverage.unit-test*

- run:
name: Report testing coverage of project code
shell: powershell.exe
command: coverage report -m


submit_testing_coverage:
steps:
- report_testing_coverage
- report_unit_testing_coverage
- report_integration_testing_coverage
- run:
name: Submit calculation result of testing coverage of project code to coveralls
shell: powershell.exe
Expand Down Expand Up @@ -356,20 +418,35 @@ commands:
- get_unit_test_persistence_cases


prepare_integration_test:
steps:
- checkout # this pulls code down from GitHub
- install_pkg_manager_chocolatey
- get_integration_test_cases


run_unit_test_core:
steps:
- checkout # this pulls code down from GitHub
- install_python_dependecies
- run_pytest_unit_test_core
- report_testing_coverage
- report_unit_testing_coverage


run_unit_test_persistence:
steps:
# - checkout # this pulls code down from GitHub
- install_python_dependecies
- run_pytest_unit_test_persistence
- report_testing_coverage
- report_unit_testing_coverage


run_integration_test:
steps:
- checkout # this pulls code down from GitHub
- install_python_dependecies
- run_pytest_with_integration_test
- report_integration_testing_coverage


jobs:
Expand All @@ -384,6 +461,12 @@ jobs:
steps:
- prepare_unit_test_persistence

pre-testbed-integration-test:
executor: win/default # executor type
steps:
- prepare_integration_test

# # # # Unit Test - Core Features
unit-test-core-python36:
executor: win/default # executor type
steps:
Expand Down Expand Up @@ -419,6 +502,7 @@ jobs:
- install_python_310
- run_unit_test_core

# # # # Unit Test - Persistence Features
unit-test-persistence-python36:
executor: win/default # executor type
steps:
Expand Down Expand Up @@ -483,6 +567,7 @@ jobs:
DB_USER: 'root'
DB_PASSWORD: 'root'

# # # # Integration Test
unit-test-persistence-python310:
executor: win/default # executor type
steps:
Expand All @@ -499,13 +584,56 @@ jobs:
DB_USER: 'root'
DB_PASSWORD: 'root'

integration-test-python36:
executor: win/default # executor type
steps:
- install_pkg_manager_chocolatey
- install_python_36
- run_integration_test

integration-test-python37:
executor: win/default # executor type
steps:
- install_pkg_manager_chocolatey
- install_python_37
- run_integration_test

integration-test-python38:
executor: win/default # executor type
steps:
- install_pkg_manager_chocolatey
- install_python_38
- run_integration_test

integration-test-python39:
executor: win/default # executor type
steps:
- install_pkg_manager_chocolatey
- install_python_39
- run_integration_test

integration-test-python310:
executor: win/default # executor type
steps:
- install_pkg_manager_chocolatey
- install_python_310
- run_integration_test

unit-test-coveralls-done:
executor: win/default # executor type
steps:
- checkout # this pulls code down from GitHub
- install_pkg_manager_chocolatey
- install_python_310
- report_testing_coverage
- report_unit_testing_coverage

integration-test-coveralls-done:
executor: win/default # executor type
steps:
- checkout # this pulls code down from GitHub
- install_pkg_manager_chocolatey
- install_python_310
- report_integration_testing_coverage

all-coveralls-done:
executor: win/default # executor type
Expand All @@ -521,55 +649,81 @@ workflows:
version: 2.1
build_and_test: # this is the name of our workflow
jobs: # and here we list the jobs we are going to run.
- pre-testbed-unit-test-core
- pre-testbed-unit-test-persistence

- unit-test-core-python36:
- pre-testbed-integration-test
# - pre-testbed-unit-test-core
# - pre-testbed-unit-test-persistence

# - unit-test-core-python36:
# requires:
# - pre-testbed-unit-test-core
# - unit-test-core-python37:
# requires:
# - pre-testbed-unit-test-core
# - unit-test-core-python38:
# requires:
# - pre-testbed-unit-test-core
# - unit-test-core-python39:
# requires:
# - pre-testbed-unit-test-core
# - unit-test-core-python310:
# requires:
# - pre-testbed-unit-test-core

# - unit-test-persistence-python36:
# requires:
# - pre-testbed-unit-test-persistence
# - unit-test-persistence-python37:
# requires:
# - pre-testbed-unit-test-persistence
# - unit-test-persistence-python38:
# requires:
# - pre-testbed-unit-test-persistence
# - unit-test-persistence-python39:
# requires:
# - pre-testbed-unit-test-persistence
# - unit-test-persistence-python310:
# requires:
# - pre-testbed-unit-test-persistence

- integration-test-python36:
requires:
- pre-testbed-unit-test-core
- unit-test-core-python37:
- pre-testbed-integration-test
- integration-test-python37:
requires:
- pre-testbed-unit-test-core
- unit-test-core-python38:
- pre-testbed-integration-test
- integration-test-python38:
requires:
- pre-testbed-unit-test-core
- unit-test-core-python39:
- pre-testbed-integration-test
- integration-test-python39:
requires:
- pre-testbed-unit-test-core
- unit-test-core-python310:
- pre-testbed-integration-test
- integration-test-python310:
requires:
- pre-testbed-unit-test-core

- unit-test-persistence-python36:
requires:
- pre-testbed-unit-test-persistence
- unit-test-persistence-python37:
requires:
- pre-testbed-unit-test-persistence
- unit-test-persistence-python38:
requires:
- pre-testbed-unit-test-persistence
- unit-test-persistence-python39:
requires:
- pre-testbed-unit-test-persistence
- unit-test-persistence-python310:
requires:
- pre-testbed-unit-test-persistence

- unit-test-coveralls-done:
- pre-testbed-integration-test

# - unit-test-coveralls-done:
# requires:
# - unit-test-core-python36
# - unit-test-core-python37
# - unit-test-core-python38
# - unit-test-core-python39
# - unit-test-core-python310
# - unit-test-persistence-python36
# - unit-test-persistence-python37
# - unit-test-persistence-python38
# - unit-test-persistence-python39
# - unit-test-persistence-python310

- integration-test-coveralls-done:
requires:
- unit-test-core-python36
- unit-test-core-python37
- unit-test-core-python38
- unit-test-core-python39
- unit-test-core-python310
- unit-test-persistence-python36
- unit-test-persistence-python37
- unit-test-persistence-python38
- unit-test-persistence-python39
- unit-test-persistence-python310
- integration-test-python36
- integration-test-python37
- integration-test-python38
- integration-test-python39
- integration-test-python310

- all-coveralls-done:
requires:
- unit-test-coveralls-done
- integration-test-coveralls-done
# - unit-test-coveralls-done

Loading

0 comments on commit e8734e7

Please sign in to comment.