Fix: #279 render special char #95
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: End-to-End Testing | |
# TODO: update all yml for 3.0 | |
on: | |
pull_request_target: | |
types: [opened, reopened, synchronize] | |
branches: | |
- master | |
jobs: | |
e2e_test_mac_arm: | |
runs-on: self-hosted | |
strategy: | |
matrix: | |
node-versions: ["16.17.1"] | |
steps: | |
- name: Checkout Project | |
uses: actions/checkout@v2 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
- name: Set env | |
run: | | |
cp ./build_configs/electron-builder.mac.arm.dev.json5 ./electron-builder.json5 | |
rm -rf ./app/utils/crypto | |
- name: Clone Private Repository | |
uses: actions/checkout@v2 | |
with: | |
repository: Future-Scholars/paperlib-crypto | |
token: ${{ secrets.CRYPTO_REPO_KEY }} | |
path: ./app/utils/crypto | |
- name: Setup NodeJS Environment ${{ matrix.node-versions }} | |
uses: actions/setup-node@v2 | |
with: | |
node-version: ${{ matrix.node-versions }} | |
- name: Install Node Module | |
run: | | |
node -v | |
npm install --force | |
npx playwright install --with-deps | |
- name: Cleanup Env | |
run: | | |
rm -rf ~/Documents/paperlib | |
rm -rf ~/Library/Application\ Support/paperlib | |
- name: End-to-End Testing | |
run: | | |
cat tests/e2e.test.ts | |
npm run test:e2e | |
- name: Print Log | |
if: ${{ !cancelled() && (success() || failure()) }} | |
run: cat ~/Library/Logs/paperlib/renderer.log | |
- name: Zip screenshots | |
if: ${{ !cancelled() && (success() || failure()) }} | |
uses: vimtor/action-zip@v1 | |
with: | |
files: screenshots/ | |
dest: screenshots.zip | |
- name: Install Oracle Cloud CLI | |
if: ${{ !cancelled() && (success() || failure()) }} | |
run: | | |
brew install oci-cli && mkdir -p ~/.oci | |
echo -n ${{ secrets.OCI_CFG_DATA }} | base64 --decode -o config | |
mv config ~/.oci | |
echo -n ${{ secrets.OCI_KEY_DATA }} | base64 --decode -o oraclekey.cer | |
mv oraclekey.cer ~/.oci | |
- name: Upload to Oracle Storage | |
if: ${{ !cancelled() && (success() || failure()) }} | |
run: | | |
oci os object put --bucket-name ${{ secrets.OCI_OS_BUCKET }} --file './screenshots.zip' --namespace ${{ secrets.OCI_OS_NAMESPACE }} --force --name 'screenshots/macos-arm-screenshots.zip' | |
e2e_test_mac_x86: | |
runs-on: macos-latest | |
strategy: | |
matrix: | |
node-versions: ["16.17.1"] | |
steps: | |
- name: Checkout Project | |
uses: actions/checkout@v2 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
- name: Set env | |
run: | | |
cp ./build_configs/electron-builder.mac.dev.json5 ./electron-builder.json5 | |
rm -rf ./app/utils/crypto | |
- name: Clone Private Repository | |
uses: actions/checkout@v2 | |
with: | |
repository: Future-Scholars/paperlib-crypto | |
token: ${{ secrets.CRYPTO_REPO_KEY }} | |
path: ./app/utils/crypto | |
- name: Setup NodeJS Environment ${{ matrix.node-versions }} | |
uses: actions/setup-node@v2 | |
with: | |
node-version: ${{ matrix.node-versions }} | |
- name: Install Node Module | |
run: | | |
node -v | |
npm install --force | |
npx playwright install --with-deps | |
- name: Cleanup Env | |
run: | | |
rm -rf ~/Documents/paperlib | |
rm -rf ~/Library/Application\ Support/paperlib | |
- name: End-to-End Testing | |
run: | | |
cat tests/e2e.test.ts | |
npm run test:e2e | |
- name: Print Log | |
if: ${{ !cancelled() && (success() || failure()) }} | |
run: cat ~/Library/Logs/paperlib/renderer.log | |
- name: Zip screenshots | |
if: ${{ !cancelled() && (success() || failure()) }} | |
uses: vimtor/action-zip@v1 | |
with: | |
files: screenshots/ | |
dest: screenshots.zip | |
- name: Install Oracle Cloud CLI | |
if: ${{ !cancelled() && (success() || failure()) }} | |
run: | | |
brew install oci-cli && mkdir -p ~/.oci | |
echo -n ${{ secrets.OCI_CFG_DATA }} | base64 --decode --output config | |
mv config ~/.oci | |
echo -n ${{ secrets.OCI_KEY_DATA }} | base64 --decode --output oraclekey.cer | |
mv oraclekey.cer ~/.oci | |
- name: Upload to Oracle Storage | |
if: ${{ !cancelled() && (success() || failure()) }} | |
run: | | |
oci os object put --bucket-name ${{ secrets.OCI_OS_BUCKET }} --file './screenshots.zip' --namespace ${{ secrets.OCI_OS_NAMESPACE }} --force --name 'screenshots/macos-screenshots.zip' | |
e2e_test_win: | |
runs-on: windows-latest | |
defaults: | |
run: | |
shell: bash | |
strategy: | |
matrix: | |
node-versions: ["16.17.1"] | |
steps: | |
- name: Checkout Project | |
uses: actions/checkout@v2 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
- name: Set env | |
run: | | |
cp ./build_configs/electron-builder.win.dev.json5 ./electron-builder.json5 | |
rm -rf ./app/utils/crypto | |
powershell Set-DisplayResolution -Width 1920 -Height 1080 -Force | |
- name: Clone Private Repository | |
uses: actions/checkout@v2 | |
with: | |
repository: Future-Scholars/paperlib-crypto | |
token: ${{ secrets.CRYPTO_REPO_KEY }} | |
path: ./app/utils/crypto | |
- name: Setup NodeJS Environment ${{ matrix.node-versions }} | |
uses: actions/setup-node@v2 | |
with: | |
node-version: ${{ matrix.node-versions }} | |
- name: Install Node Module | |
run: | | |
node -v | |
npm install --force | |
npx playwright install --with-deps | |
- name: Cleanup Env | |
run: | | |
rm -rf C:\Users\runneradmin\Documents\paperlib | |
rm -rf C:\Users\runneradmin\AppData\Local\paperlib | |
- name: End-to-End Testing | |
run: | | |
cat tests/e2e.test.ts | |
npm run test:e2e | |
- name: Print Log | |
if: ${{ !cancelled() && (success() || failure()) }} | |
run: cat 'C:\Users\runneradmin\AppData\Roaming\paperlib\logs\renderer.log' | |
- name: Zip screenshots | |
if: ${{ !cancelled() && (success() || failure()) }} | |
uses: vimtor/action-zip@v1 | |
with: | |
files: screenshots/ | |
dest: screenshots.zip | |
- name: Install Oracle Cloud CLI | |
if: ${{ !cancelled() && (success() || failure()) }} | |
run: | | |
pip install cffi | |
curl https://raw.githubusercontent.com/oracle/oci-cli/master/scripts/install/install.ps1 --output install.ps1 | |
powershell ./install.ps1 -AcceptAllDefaults | |
mkdir ~/.oci | |
echo ${{ secrets.OCI_CFG_DATA }} > config.secret | |
base64 --decode config.secret > config | |
mv config ~/.oci | |
echo ${{ secrets.OCI_KEY_DATA }} > oraclekey.cer.secret | |
base64 --decode oraclekey.cer.secret > oraclekey.cer | |
mv oraclekey.cer ~/.oci | |
- name: Upload to Oracle Storage | |
if: ${{ !cancelled() && (success() || failure()) }} | |
run: | | |
ls ./ | |
oci os object put --bucket-name ${{ secrets.OCI_OS_BUCKET }} --file './screenshots.zip' --namespace ${{ secrets.OCI_OS_NAMESPACE }} --force --name 'screenshots/windows-screenshots.zip' | |
e2e_test_linux: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-versions: ["16.17.1"] | |
steps: | |
- name: Checkout Project | |
uses: actions/checkout@v2 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
- name: Set env | |
run: | | |
cp ./build_configs/electron-builder.linux.dev.json5 ./electron-builder.json5 | |
rm -rf ./app/utils/crypto | |
sudo apt-get update | |
sudo apt-get install -y imagemagick | |
sudo apt-get install -y x11-xserver-utils | |
- name: Clone Private Repository | |
uses: actions/checkout@v2 | |
with: | |
repository: Future-Scholars/paperlib-crypto | |
token: ${{ secrets.CRYPTO_REPO_KEY }} | |
path: ./app/utils/crypto | |
- name: Setup NodeJS Environment ${{ matrix.node-versions }} | |
uses: actions/setup-node@v2 | |
with: | |
node-version: ${{ matrix.node-versions }} | |
- name: Install Node Module | |
run: | | |
node -v | |
npm install --force | |
npx playwright install --with-deps | |
- name: Cleanup Env | |
run: | | |
rm -rf ~/Documents/paperlib | |
rm -rf ~/.config/paperlib | |
- name: End-to-End Testing | |
run: | | |
cat tests/e2e.test.ts | |
xvfb-run --auto-servernum --server-args="-screen 0 1920x1080x24" -- npm run test:e2e | |
- name: Print Log | |
if: ${{ !cancelled() && (success() || failure()) }} | |
run: cat ~/.config/paperlib/logs/renderer.log | |
- name: Zip screenshots | |
if: ${{ !cancelled() && (success() || failure()) }} | |
uses: vimtor/action-zip@v1 | |
with: | |
files: screenshots/ | |
dest: screenshots.zip | |
- name: Install Oracle Cloud CLI | |
if: ${{ !cancelled() && (success() || failure()) }} | |
run: | | |
curl -L -O https://raw.githubusercontent.com/oracle/oci-cli/master/scripts/install/install.sh | |
bash ./install.sh --accept-all-defaults | |
mkdir -p ~/.oci | |
echo -n ${{ secrets.OCI_CFG_DATA }} | base64 --decode > config | |
mv config ~/.oci | |
echo -n ${{ secrets.OCI_KEY_DATA }} | base64 --decode > oraclekey.cer | |
mv oraclekey.cer ~/.oci | |
- name: Upload to Oracle Storage | |
if: ${{ !cancelled() && (success() || failure()) }} | |
run: | | |
ls ./ | |
~/bin/oci os object put --bucket-name ${{ secrets.OCI_OS_BUCKET }} --file './screenshots.zip' --namespace ${{ secrets.OCI_OS_NAMESPACE }} --force --name 'screenshots/linux-screenshots.zip' |