Online experiments - 2 #21
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: Online experiments - 2 | |
on: | |
schedule: | |
- cron: "30 11 * * *" | |
push: | |
paths: | |
- "**/online-experiments-2.yml" | |
branches: [main] | |
jobs: | |
nightly_job: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
node-version: [16] | |
fail-fast: false | |
environment: | |
name: CICD | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.PAT }} | |
GITHUB_PAT: ${{ secrets.PAT }} | |
EMAIL_USERNAME: ${{ secrets.EMAIL_USERNAME }} | |
EMAIL_PASSWORD: ${{ secrets.EMAIL_PASSWORD }} | |
PHONE_NUMBER_ACCOUNT: ${{ secrets.PHONE_NUMBER_ACCOUNT }} | |
PHONE_NUMBER_TOKEN: ${{ secrets.PHONE_NUMBER_TOKEN }} | |
TEST_EMAIL_DOMAIN: ${{ secrets.TEST_EMAIL_DOMAIN }} | |
TEST1_EMAIL: ${{ secrets.TEST1_EMAIL }} | |
TEST2_EMAIL: ${{ secrets.TEST2_EMAIL }} | |
TEST3_EMAIL: ${{ secrets.TEST3_EMAIL }} | |
TEST1_PHONE_NUMBER: ${{ secrets.TEST1_PHONE_NUMBER }} | |
TEST2_PHONE_NUMBER: ${{ secrets.TEST2_PHONE_NUMBER }} | |
TEST3_PHONE_NUMBER: ${{ secrets.TEST3_PHONE_NUMBER }} | |
TEST_PASSWORD: ${{ secrets.TEST_PASSWORD }} | |
TEST_RESET_PASSWORD: ${{ secrets.TEST_RESET_PASSWORD }} | |
OAUTH_ACCOUNT_PASSWORD: ${{ secrets.OAUTH_ACCOUNT_PASSWORD }} | |
TWITTER_CONSUMER_KEY: ${{ secrets.TWITTER_CONSUMER_KEY }} | |
TWITTER_CONSUMER_SECRET: ${{ secrets.TWITTER_CONSUMER_SECRET }} | |
TWITTER_ACCESS_TOKEN_KEY: ${{ secrets.TWITTER_ACCESS_TOKEN_KEY }} | |
TWITTER_ACCESS_TOKEN_SECRET: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }} | |
steps: | |
- name: Get short SHA 🔑 | |
id: sha | |
run: | | |
echo "sha7=${GITHUB_SHA::7}" >> $GITHUB_OUTPUT | |
shell: bash | |
- name: Checkout ${{ steps.sha.outputs.sha7 }} ⬇️ | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
ref: main | |
- name: Setup Node.js ${{ matrix.node-version }} 📮 | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: "yarn" | |
registry-url: "https://npm.pkg.github.com" | |
scope: "@zeeis" | |
- name: Install dependencies 👨🏻💻 | |
uses: nick-fields/retry@v2 | |
with: | |
timeout_seconds: 600 | |
max_attempts: 2 | |
shell: bash | |
retry_on: error | |
command: yarn | |
on_retry_command: rm -rf C:/Users/runneradmin/AppData/Local/node-gyp/ | |
- name: Install UnPackaged 👨🏻💻 | |
uses: nick-fields/retry@v2 | |
with: | |
timeout_seconds: 600 | |
max_attempts: 2 | |
shell: bash | |
retry_on: error | |
command: yarn unpackaged | |
on_retry_command: rm -rf C:/Users/runneradmin/AppData/Local/node-gyp/ | |
- name: oauth E2E Test 🧪(include passwordTest) | |
if: github.event_name == 'schedule' | |
run: | | |
export REPO=alphabiz | |
yarn test:e2e:electron:library | |
unset REPO | |
shell: bash | |
- name: oauth E2E Test 🧪(exclude passwordTest) | |
if: github.event_name == 'push' | |
run: | | |
export REPO=alphabiz | |
export excludePasswordTest=1 | |
yarn test:e2e:electron:library | |
unset REPO | |
shell: bash | |
- name: oauth E2E Test 🧪( library channel ) | |
run: | | |
export REPO=alphabiz | |
yarn test:e2e:electron:libChannel | |
unset REPO | |
shell: bash | |
- name: Upload Test Results 🗃 | |
if: always() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: "${{ matrix.os }}-output" | |
path: test/output/** |