From dc47d096400e7a4d95dd9516c72876c8ad016dcb Mon Sep 17 00:00:00 2001 From: vnugent Date: Thu, 17 Oct 2024 23:33:46 -0400 Subject: update CI tests and run cross-platform unit testing --- .onedev-buildspec.yml | 75 +++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 67 insertions(+), 8 deletions(-) (limited to '.onedev-buildspec.yml') diff --git a/.onedev-buildspec.yml b/.onedev-buildspec.yml index f2ae8cb..8bbe9c7 100644 --- a/.onedev-buildspec.yml +++ b/.onedev-buildspec.yml @@ -1,6 +1,5 @@ -version: 35 +version: 36 jobs: - - name: Git mirror push steps: - !PushRepository @@ -27,15 +26,75 @@ jobs: retryDelay: 30 timeout: 3600 -- name: Build and publish - jobExecutor: primary-shell-executor +- name: Unit Testing + steps: + - !CheckoutStep + name: checkout + cloneCredential: !DefaultCredential {} + withLfs: false + withSubmodules: false + checkoutPath: '@project_name@' + condition: ALL_PREVIOUS_STEPS_WERE_SUCCESSFUL + - !CommandStep + name: run unit tests + runInContainer: false + interpreter: !DefaultInterpreter + commands: | + cd @project_name@ + task -t Module.Taskfile.yaml test + useTTY: true + condition: ALL_PREVIOUS_STEPS_WERE_SUCCESSFUL + triggers: + - !BranchUpdateTrigger + branches: '** -master' + retryCondition: never + maxRetries: 3 + retryDelay: 30 + timeout: 14400 +- name: Staging build + steps: + - !CheckoutStep + name: checkout + cloneCredential: !DefaultCredential {} + withLfs: false + withSubmodules: false + checkoutPath: '@project_name@' + condition: ALL_PREVIOUS_STEPS_WERE_SUCCESSFUL + - !CommandStep + name: VNBuild build + runInContainer: false + interpreter: !DefaultInterpreter + commands: | + vnbuild build -S --verbose + useTTY: true + condition: ALL_PREVIOUS_STEPS_WERE_SUCCESSFUL + - !CommandStep + name: VNBuild mock publish + runInContainer: false + interpreter: !DefaultInterpreter + commands: | + vnbuild publish --sign + useTTY: true + condition: ALL_PREVIOUS_STEPS_WERE_SUCCESSFUL + triggers: + - !BranchUpdateTrigger + branches: develop master + jobDependencies: + - jobName: Unit Testing + requireSuccessful: true + retryCondition: never + maxRetries: 3 + retryDelay: 30 + timeout: 14400 + +- name: Publish on tag steps: - !CheckoutStep - name: Code checkout + name: checkout cloneCredential: !DefaultCredential {} withLfs: false withSubmodules: false - checkoutPath: '@project_name@/' + checkoutPath: '@project_name@' condition: ALL_PREVIOUS_STEPS_WERE_SUCCESSFUL - !CommandStep name: VNBuild build @@ -59,9 +118,9 @@ jobs: useTTY: true condition: ALL_PREVIOUS_STEPS_WERE_SUCCESSFUL triggers: - - !BranchUpdateTrigger + - !TagCreateTrigger branches: master retryCondition: never maxRetries: 3 retryDelay: 30 - timeout: 3600 \ No newline at end of file + timeout: 14400 -- cgit