mirror of
https://github.com/quine-global/hyper.git
synced 2026-01-13 04:28:41 -09:00
wip
This commit is contained in:
parent
a076c2859f
commit
acdfff0841
1 changed files with 65 additions and 22 deletions
87
.github/actions/build/action.yml
vendored
87
.github/actions/build/action.yml
vendored
|
|
@ -9,29 +9,22 @@ runs:
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Use Node.js
|
- name: Use Node.js ${{ env.NODE_VERSION }}
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: ${{ inputs.node-version }}
|
node-version: ${{ env.NODE_VERSION }}
|
||||||
cache: "yarn"
|
|
||||||
|
|
||||||
- name: Install Yarn
|
|
||||||
shell: bash
|
|
||||||
run: npm install -g yarn
|
|
||||||
|
|
||||||
- name: Fix node-gyp and Python
|
- name: Fix node-gyp and Python
|
||||||
shell: bash
|
|
||||||
run: |
|
run: |
|
||||||
if [[ "$RUNNER_OS" == "macOS" ]]; then
|
if [[ "$RUNNER_OS" == "macOS" ]]; then
|
||||||
brew install python-setuptools python-packaging
|
brew install python-setuptools python-packaging
|
||||||
else
|
else
|
||||||
python3 -m pip install packaging setuptools
|
python3 -m pip install $EXTRA_ARGS packaging setuptools
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Get yarn cache directory path
|
- name: Get yarn cache directory path
|
||||||
id: yarn-cache-dir-path
|
id: yarn-cache-dir-path
|
||||||
shell: bash
|
|
||||||
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
|
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- uses: actions/cache/restore@v4
|
- uses: actions/cache/restore@v4
|
||||||
|
|
@ -41,32 +34,27 @@ runs:
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-yarn-
|
${{ runner.os }}-yarn-
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install
|
||||||
shell: bash
|
|
||||||
run: yarn install
|
run: yarn install
|
||||||
env:
|
env:
|
||||||
npm_config_node_gyp: ${{ github.workspace }}${{ runner.os == 'Windows' && '\node_modules\node-gyp\bin\node-gyp.js' || '/node_modules/node-gyp/bin/node-gyp/bin/node-gyp.js' }}
|
npm_config_node_gyp: ${{ github.workspace }}${{ runner.os == 'Windows' && '\node_modules\node-gyp\bin\node-gyp.js' || '/node_modules/node-gyp/bin/node-gyp.js' }}
|
||||||
|
|
||||||
- name: Install libarchive-tools
|
- name: Install libarchive-tools
|
||||||
if: runner.os == 'Linux'
|
if: runner.os == 'Linux'
|
||||||
shell: bash
|
|
||||||
run: |
|
run: |
|
||||||
sudo apt update
|
sudo apt update
|
||||||
sudo apt install libarchive-tools
|
sudo apt install libarchive-tools
|
||||||
|
|
||||||
- name: Lint and Run Unit Tests
|
- name: Lint and Run Unit Tests
|
||||||
shell: bash
|
|
||||||
run: yarn run test
|
run: yarn run test
|
||||||
|
|
||||||
- name: Getting Build Icon
|
- name: Getting Build Icon
|
||||||
if: github.ref == 'refs/heads/canary' || github.base_ref == 'canary'
|
if: github.ref == 'refs/heads/canary' || github.base_ref == 'canary'
|
||||||
shell: bash
|
|
||||||
run: |
|
run: |
|
||||||
cp build/canary.ico build/icon.ico
|
cp build/canary.ico build/icon.ico
|
||||||
cp build/canary.icns build/icon.icns
|
cp build/canary.icns build/icon.icns
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
shell: bash
|
|
||||||
run: |
|
run: |
|
||||||
if [ -z "$CSC_LINK" ] ; then unset CSC_LINK ; fi
|
if [ -z "$CSC_LINK" ] ; then unset CSC_LINK ; fi
|
||||||
if [ -z "$CSC_KEY_PASSWORD" ] ; then unset CSC_KEY_PASSWORD ; fi
|
if [ -z "$CSC_KEY_PASSWORD" ] ; then unset CSC_KEY_PASSWORD ; fi
|
||||||
|
|
@ -87,7 +75,7 @@ runs:
|
||||||
- name: Archive Build Artifacts
|
- name: Archive Build Artifacts
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: hyper-${{ runner.os }}
|
name: hyper-${{ runner.os }}-${{ matrix.name }}
|
||||||
path: |
|
path: |
|
||||||
dist/*.dmg
|
dist/*.dmg
|
||||||
dist/*.snap
|
dist/*.snap
|
||||||
|
|
@ -96,9 +84,8 @@ runs:
|
||||||
dist/*.pacman
|
dist/*.pacman
|
||||||
dist/*.exe
|
dist/*.exe
|
||||||
|
|
||||||
- name: Run E2E Tests (non-Linux)
|
- name: Run E2E Tests
|
||||||
if: runner.os != 'Linux'
|
if: runner.os != 'Linux'
|
||||||
shell: bash
|
|
||||||
run: yarn run test:e2e --verbose
|
run: yarn run test:e2e --verbose
|
||||||
|
|
||||||
- name: Run E2E Tests on Linux
|
- name: Run E2E Tests on Linux
|
||||||
|
|
@ -106,4 +93,60 @@ runs:
|
||||||
uses: GabrielBB/xvfb-action@v1.7
|
uses: GabrielBB/xvfb-action@v1.7
|
||||||
with:
|
with:
|
||||||
run: |
|
run: |
|
||||||
yarn run test
|
yarn run test:e2e
|
||||||
|
env:
|
||||||
|
SHELL: /bin/bash
|
||||||
|
DEBUG: "pw:browser*"
|
||||||
|
|
||||||
|
- name: Archive E2E test screenshot
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: e2e-${{ matrix.os }}-${{ strategy.job-index }}
|
||||||
|
path: dist/tmp/*.png
|
||||||
|
|
||||||
|
- name: Save the pr number in an artifact
|
||||||
|
if: github.event_name == 'pull_request'
|
||||||
|
env:
|
||||||
|
PR_NUM: ${{ github.event.number }}
|
||||||
|
run: echo $PR_NUM > pr_num.txt
|
||||||
|
|
||||||
|
- name: Upload the pr num
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
if: github.event_name == 'pull_request'
|
||||||
|
with:
|
||||||
|
name: pr_num
|
||||||
|
path: ./pr_num.txt
|
||||||
|
|
||||||
|
- uses: actions/cache/save@v4
|
||||||
|
if: github.event_name == 'push'
|
||||||
|
with:
|
||||||
|
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
||||||
|
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock', 'app/yarn.lock') }}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# - name: Archive Build Artifacts
|
||||||
|
# uses: actions/upload-artifact@v4
|
||||||
|
# with:
|
||||||
|
# name: hyper-${{ runner.os }}
|
||||||
|
# path: |
|
||||||
|
# dist/*.dmg
|
||||||
|
# dist/*.snap
|
||||||
|
# dist/*.AppImage
|
||||||
|
# dist/*.deb
|
||||||
|
# dist/*.pacman
|
||||||
|
# dist/*.exe
|
||||||
|
#
|
||||||
|
# - name: Run E2E Tests (non-Linux)
|
||||||
|
# if: runner.os != 'Linux'
|
||||||
|
# shell: bash
|
||||||
|
# run: yarn run test:e2e --verbose
|
||||||
|
#
|
||||||
|
# - name: Run E2E Tests on Linux
|
||||||
|
# if: runner.os == 'Linux'
|
||||||
|
# uses: GabrielBB/xvfb-action@v1.7
|
||||||
|
# with:
|
||||||
|
# run: |
|
||||||
|
# yarn run test
|
||||||
|
#
|
||||||
Loading…
Reference in a new issue