mirror of
https://github.com/quine-global/hyper.git
synced 2026-01-12 20:18: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:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Use Node.js
|
||||
|
||||
- name: Use Node.js ${{ env.NODE_VERSION }}
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{ inputs.node-version }}
|
||||
cache: "yarn"
|
||||
|
||||
- name: Install Yarn
|
||||
shell: bash
|
||||
run: npm install -g yarn
|
||||
node-version: ${{ env.NODE_VERSION }}
|
||||
|
||||
- name: Fix node-gyp and Python
|
||||
shell: bash
|
||||
run: |
|
||||
if [[ "$RUNNER_OS" == "macOS" ]]; then
|
||||
brew install python-setuptools python-packaging
|
||||
else
|
||||
python3 -m pip install packaging setuptools
|
||||
python3 -m pip install $EXTRA_ARGS packaging setuptools
|
||||
fi
|
||||
|
||||
- name: Get yarn cache directory path
|
||||
id: yarn-cache-dir-path
|
||||
shell: bash
|
||||
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
|
||||
|
||||
- uses: actions/cache/restore@v4
|
||||
|
|
@ -41,32 +34,27 @@ runs:
|
|||
restore-keys: |
|
||||
${{ runner.os }}-yarn-
|
||||
|
||||
- name: Install dependencies
|
||||
shell: bash
|
||||
- name: Install
|
||||
run: yarn install
|
||||
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
|
||||
if: runner.os == 'Linux'
|
||||
shell: bash
|
||||
run: |
|
||||
sudo apt update
|
||||
sudo apt install libarchive-tools
|
||||
|
||||
- name: Lint and Run Unit Tests
|
||||
shell: bash
|
||||
run: yarn run test
|
||||
|
||||
- name: Getting Build Icon
|
||||
if: github.ref == 'refs/heads/canary' || github.base_ref == 'canary'
|
||||
shell: bash
|
||||
run: |
|
||||
cp build/canary.ico build/icon.ico
|
||||
cp build/canary.icns build/icon.icns
|
||||
|
||||
- name: Build
|
||||
shell: bash
|
||||
run: |
|
||||
if [ -z "$CSC_LINK" ] ; then unset CSC_LINK ; fi
|
||||
if [ -z "$CSC_KEY_PASSWORD" ] ; then unset CSC_KEY_PASSWORD ; fi
|
||||
|
|
@ -87,7 +75,7 @@ runs:
|
|||
- name: Archive Build Artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: hyper-${{ runner.os }}
|
||||
name: hyper-${{ runner.os }}-${{ matrix.name }}
|
||||
path: |
|
||||
dist/*.dmg
|
||||
dist/*.snap
|
||||
|
|
@ -96,9 +84,8 @@ runs:
|
|||
dist/*.pacman
|
||||
dist/*.exe
|
||||
|
||||
- name: Run E2E Tests (non-Linux)
|
||||
- name: Run E2E Tests
|
||||
if: runner.os != 'Linux'
|
||||
shell: bash
|
||||
run: yarn run test:e2e --verbose
|
||||
|
||||
- name: Run E2E Tests on Linux
|
||||
|
|
@ -106,4 +93,60 @@ runs:
|
|||
uses: GabrielBB/xvfb-action@v1.7
|
||||
with:
|
||||
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