Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GitHub Desktop Pull Request Notification Testing - Failed Unit Tests #2

Open
wants to merge 7 commits into
base: development
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
95 changes: 7 additions & 88 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,44 +5,16 @@ on:
branches:
- development
pull_request:
workflow_call:
inputs:
repository:
default: desktop/desktop
required: false
type: string
ref:
required: true
type: string
upload-artifacts:
default: false
required: false
type: boolean
environment:
type: string
required: true
secrets:
DESKTOP_OAUTH_CLIENT_ID:
DESKTOP_OAUTH_CLIENT_SECRET:
APPLE_ID:
APPLE_ID_PASSWORD:
APPLE_TEAM_ID:
APPLE_APPLICATION_CERT:
APPLE_APPLICATION_CERT_PASSWORD:
WINDOWS_CERT_PFX:
WINDOWS_CERT_PASSWORD:

jobs:
lint:
name: Lint
runs-on: ubuntu-latest
env:
RELEASE_CHANNEL: ${{ inputs.environment }}
RELEASE_CHANNEL: development
steps:
- uses: actions/checkout@v4
with:
repository: ${{ inputs.repository || github.repository }}
ref: ${{ inputs.ref }}
submodules: recursive
- uses: actions/setup-node@v3
with:
Expand All @@ -63,86 +35,33 @@ jobs:
fail-fast: false
matrix:
node: [18.16.1]
os: [macos-13-xl-arm64, windows-2019]
arch: [x64, arm64]
os: [macos-latest]
arch: [x64]
include:
- os: macos-13-xl-arm64
- os: macos-latest
friendlyName: macOS
- os: windows-2019
friendlyName: Windows
timeout-minutes: 60
env:
RELEASE_CHANNEL: ${{ inputs.environment }}
RELEASE_CHANNEL: development
steps:
- uses: actions/checkout@v4
with:
repository: ${{ inputs.repository || github.repository }}
ref: ${{ inputs.ref }}
repository: ${{ github.repository }}
ref: ${{ github.ref }}
submodules: recursive
- uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
cache: yarn

# This step can be removed as soon as official Windows arm64 builds are published:
# https://github.com/nodejs/build/issues/2450#issuecomment-705853342
- name: Get NodeJS node-gyp lib for Windows arm64
if: ${{ matrix.os == 'windows-2019' && matrix.arch == 'arm64' }}
run: .\script\download-nodejs-win-arm64.ps1 ${{ matrix.node }}

- name: Install and build dependencies
run: yarn
env:
npm_config_arch: ${{ matrix.arch }}
TARGET_ARCH: ${{ matrix.arch }}
- 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 }}
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
APPLE_APPLICATION_CERT: ${{ secrets.APPLE_APPLICATION_CERT }}
KEY_PASSWORD: ${{ secrets.APPLE_APPLICATION_CERT_PASSWORD }}
npm_config_arch: ${{ matrix.arch }}
TARGET_ARCH: ${{ matrix.arch }}
- name: Prepare testing environment
if: matrix.arch == 'x64'
run: yarn test:setup
env:
npm_config_arch: ${{ matrix.arch }}
- name: Run unit tests
if: matrix.arch == 'x64'
run: yarn test:unit
- name: Run script tests
if: matrix.arch == 'x64'
run: yarn test:script
- name: Install Windows code signing certificate
if: ${{ runner.os == 'Windows' }}
shell: bash
env:
CERT_CONTENTS: ${{ secrets.WINDOWS_CERT_PFX }}
run: base64 -d <<<"$CERT_CONTENTS" > ./script/windows-certificate.pfx
- name: Package production app
run: yarn package
env:
npm_config_arch: ${{ matrix.arch }}
WINDOWS_CERT_PASSWORD: ${{ secrets.WINDOWS_CERT_PASSWORD }}
- name: Upload artifacts
uses: actions/upload-artifact@v3
if: ${{ inputs.upload-artifacts }}
with:
name: ${{matrix.friendlyName}}-${{matrix.arch}}
path: |
dist/GitHub Desktop-${{matrix.arch}}.zip
dist/GitHubDesktop-*.nupkg
dist/GitHubDesktopSetup-${{matrix.arch}}.exe
dist/GitHubDesktopSetup-${{matrix.arch}}.msi
dist/bundle-size.json
if-no-files-found: error
Comment on lines -123 to -148
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow. Removing all kinds of stuff

32 changes: 0 additions & 32 deletions .github/workflows/no-response.yml

This file was deleted.

49 changes: 0 additions & 49 deletions .github/workflows/release-pr.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[GitHub Desktop](https://desktop.github.com/) is an open source [Electron](https://www.electronjs.org/)-based
GitHub app. It is written in [TypeScript](https://www.typescriptlang.org) and
uses [React](https://reactjs.org/).
uses [React](https://reactjs.org/). test

<picture>
<source
Expand Down
2 changes: 1 addition & 1 deletion app/test/unit/accounts-store-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
)

const users = await accountsStore.getAll()
expect(users[0].login).toBe(newAccountLogin)
expect(users[0].login).toBe('joan-WRONG')

Check failure on line 23 in app/test/unit/accounts-store-test.ts

View workflow job for this annotation

GitHub Actions / macOS x64

Error: expect(received).toBe(expected) // Object.is equality Expected: "joan-WRONG" Received: "joan" at Object.<anonymous> (/Users/runner/work/desktop/desktop/app/test/unit/accounts-store-test.ts:23:30) at runNextTicks (node:internal/process/task_queues:60:5) at processImmediate (node:internal/timers:447:9)
})
})
})
Loading