From e250eef42f139b4d7e5200bc9ec3fdc742bd66f5 Mon Sep 17 00:00:00 2001 From: shachem Date: Fri, 25 Nov 2022 17:26:59 +0100 Subject: [PATCH 1/2] update code --- app/.gitlab-ci.yml | 37 +++++++++++++++++++++++++++++++++++-- 1 file changed, 35 insertions(+), 2 deletions(-) diff --git a/app/.gitlab-ci.yml b/app/.gitlab-ci.yml index 071fde3..01f9bd7 100644 --- a/app/.gitlab-ci.yml +++ b/app/.gitlab-ci.yml @@ -1,6 +1,39 @@ variables: GIT_SUBMODULE_STRATEGY: recursive +name: Run commands on different operating systems +on: + push: + branches: [ githubCI ] + pull_request: + branches: [ main ] + +jobs: + Run-npm-on-Ubuntu: + name: Run npm on Ubuntu + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: '14' + - run: npm help + + Run-PSScriptAnalyzer-on-Windows: + name: Run PSScriptAnalyzer on Windows + runs-on: windows-latest + steps: + - uses: actions/checkout@v3 + - name: Install PSScriptAnalyzer module + shell: pwsh + run: | + Set-PSRepository PSGallery -InstallationPolicy Trusted + Install-Module PSScriptAnalyzer -ErrorAction Stop + - name: Get list of rules + shell: pwsh + run: | + Get-ScriptAnalyzerRule + stages: - build - check @@ -22,7 +55,7 @@ Compile: <<: *only-default stage: build needs: [] - script: ./gradlew HealthMate:assembleInhouseRelease --no-configuration-cache + script: ./gradlew app:assembledebug --no-configuration-cache except: - tags - main @@ -31,7 +64,7 @@ Test: <<: *only-default stage: check needs: [] - script: ./gradlew testDebugUnitTest DogBreeds:testInhouseDebug --no-configuration-cache + script: ./gradlew testDebugUnitTest app:testInhouseDebug --no-configuration-cache artifacts: name: Tests reports paths: From b33946b349ed42d98110bf6ef8ced7ed33a64903 Mon Sep 17 00:00:00 2001 From: shachem Date: Fri, 25 Nov 2022 17:36:33 +0100 Subject: [PATCH 2/2] test local runner --- app/.gitlab-ci.yml | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/app/.gitlab-ci.yml b/app/.gitlab-ci.yml index 01f9bd7..211a5b5 100644 --- a/app/.gitlab-ci.yml +++ b/app/.gitlab-ci.yml @@ -9,9 +9,9 @@ on: branches: [ main ] jobs: - Run-npm-on-Ubuntu: + Run-self-hosted: name: Run npm on Ubuntu - runs-on: ubuntu-latest + runs-on: self-hosted steps: - uses: actions/checkout@v3 - uses: actions/setup-node@v3 @@ -19,21 +19,6 @@ jobs: node-version: '14' - run: npm help - Run-PSScriptAnalyzer-on-Windows: - name: Run PSScriptAnalyzer on Windows - runs-on: windows-latest - steps: - - uses: actions/checkout@v3 - - name: Install PSScriptAnalyzer module - shell: pwsh - run: | - Set-PSRepository PSGallery -InstallationPolicy Trusted - Install-Module PSScriptAnalyzer -ErrorAction Stop - - name: Get list of rules - shell: pwsh - run: | - Get-ScriptAnalyzerRule - stages: - build - check