From 745c5df62c0a3541f4090a75d102e28f272016db Mon Sep 17 00:00:00 2001 From: Brendan Forster Date: Thu, 17 Dec 2020 15:03:36 -0400 Subject: [PATCH] align CI with the upstream settings for Actions (#393) --- .github/workflows/build-macos.yml | 34 ------------------------ .github/workflows/ci.yml | 32 +++++++--------------- .github/workflows/lint.yml | 3 ++- azure-pipelines.yml | 44 ------------------------------- 4 files changed, 12 insertions(+), 101 deletions(-) delete mode 100644 .github/workflows/build-macos.yml diff --git a/.github/workflows/build-macos.yml b/.github/workflows/build-macos.yml deleted file mode 100644 index fc7f04c7dc1..00000000000 --- a/.github/workflows/build-macos.yml +++ /dev/null @@ -1,34 +0,0 @@ -name: macOS CI - -on: - push: - branches: - - linux - - 'linux-release-*' - tags: - - 'release-*.*.*-linux*' - pull_request: - branches: - - linux - - 'linux-release-*' - -jobs: - build: - runs-on: macos-latest - steps: - - uses: actions/checkout@v2 - - name: Get yarn cache directory path - id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn cache dir)" - - uses: actions/cache@v1 - id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) - with: - path: ${{ steps.yarn-cache-dir-path.outputs.dir }} - key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} - restore-keys: | - ${{ runner.os }}-yarn- - - run: yarn - env: - CI: true - - run: yarn build:prod - - run: yarn test:setup && yarn test diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1a04d161ec8..fff674d68cf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,8 +4,14 @@ on: push: branches: - development - - __release-* + - linux + - 'linux-release-*' + tags: + - 'release-*.*.*-linux*' pull_request: + branches: + - linux + - 'linux-release-*' jobs: build: @@ -15,12 +21,14 @@ jobs: fail-fast: false matrix: node: [12.14.1] - os: [macos-10.15, windows-2019] + os: [macos-10.15, windows-2019, ubuntu-20.04] include: - os: macos-10.15 friendlyName: macOS - os: windows-2019 friendlyName: Windows + - os: ubuntu-20.04 + friendlyName: Ubuntu timeout-minutes: 45 steps: - uses: actions/checkout@v2 @@ -46,22 +54,12 @@ jobs: - name: Install and build dependencies run: yarn - - name: Lint - run: yarn lint - name: Validate changelog run: yarn validate-changelog - name: Ensure a clean working directory run: yarn check-modified - name: Build production app run: yarn build:prod - env: - DESKTOP_OAUTH_CLIENT_ID: ${{ secrets.DESKTOP_OAUTH_CLIENT_ID }} - DESKTOP_OAUTH_CLIENT_SECRET: - ${{ secrets.DESKTOP_OAUTH_CLIENT_SECRET }} - APPLE_ID: ${{ secrets.APPLE_ID }} - APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }} - DESKTOPBOT_TOKEN: ${{ secrets.DESKTOPBOT_TOKEN }} - KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }} - name: Prepare testing environment run: yarn test:setup - name: Run unit tests @@ -70,13 +68,3 @@ jobs: run: yarn test:script:cov - name: Run integration tests run: yarn test:integration - - name: Publish production app - run: yarn run publish - env: - DESKTOPBOT_TOKEN: ${{ secrets.DESKTOPBOT_TOKEN }} - WINDOWS_CERT_PASSWORD: ${{ secrets.WINDOWS_CERT_PASSWORD }} - KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }} - DEPLOYMENT_SECRET: ${{ secrets.DEPLOYMENT_SECRET }} - S3_KEY: ${{ secrets.S3_KEY }} - S3_SECRET: ${{ secrets.S3_SECRET }} - S3_BUCKET: github-desktop diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 66b8025a7c2..075086d1a16 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -13,7 +13,8 @@ on: - 'linux-release-*' jobs: - build: + run: + name: 'Check source code' runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 diff --git a/azure-pipelines.yml b/azure-pipelines.yml index b8fc6139420..325febae3cd 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -27,38 +27,6 @@ pr: - '*' jobs: - - job: Windows - pool: - vmImage: windows-2019 - steps: - - task: NodeTool@0 - inputs: - versionSpec: '10.x' - - task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2 - inputs: - versionSpec: '1.5.1' - - script: | - yarn install --force - name: Install - - script: | - yarn build:prod - name: Build - - script: | - yarn test:setup && yarn test - name: Test - - task: PublishTestResults@2 - displayName: 'Publish Test Results' - inputs: - testResultsFiles: '**junit*.xml' - testRunTitle: $(Agent.OS) Test Results - condition: always() - - task: PublishCodeCoverageResults@1 - displayName: 'Publish code coverage results' - inputs: - codeCoverageTool: 'cobertura' - summaryFileLocation: '**/app/coverage/cobertura-coverage.xml' - condition: always() - - job: Linux pool: vmImage: ubuntu-16.04 @@ -103,15 +71,3 @@ jobs: condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/')) - - task: PublishTestResults@2 - displayName: 'Publish Test Results' - inputs: - testResultsFiles: '**junit*.xml' - testRunTitle: $(Agent.OS) Test Results - condition: always() - - task: PublishCodeCoverageResults@1 - displayName: 'Publish code coverage results' - inputs: - codeCoverageTool: 'cobertura' - summaryFileLocation: '**/app/coverage/cobertura-coverage.xml' - condition: always()