Nightly #8
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
# Example workflow for running cron jobs | |
name: Nightly | |
on: | |
schedule: | |
# ┌───────────── minute (0 - 59) | |
# │ ┌───────────── hour (0 - 23) | |
# │ │ ┌───────────── day of the month (1 - 31) | |
# │ │ │ ┌───────────── month (1 - 12 or JAN-DEC) | |
# │ │ │ │ ┌───────────── day of the week (0 - 6 or SUN-SAT) | |
# │ │ │ │ │ | |
# │ │ │ │ │ | |
# │ │ │ │ │ | |
# * * * * * | |
- cron: 0 0 1 * * # Example: change to `0 0 * * 1-5` in order to run every working day | |
workflow_dispatch: {} | |
permissions: {} | |
jobs: | |
trunk_check_upload: | |
name: Trunk Check Upload | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
timeout-minutes: 8 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
- name: Setup NodeJS | |
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0 | |
with: | |
node-version: 20.7.0 | |
cache: npm | |
- name: Install package dependencies | |
run: npm ci | |
- name: Generate types | |
run: npm run codecept:types | |
env: | |
TESTS_MOBILE_COMMON_LAUNCH_TYPE: ${{ vars.TESTS_MOBILE_COMMON_LAUNCH_TYPE }} | |
TESTS_MOBILE_COMMON_USER_PASSWORD: ${{ secrets.TESTS_MOBILE_COMMON_USER_PASSWORD }} | |
TESTS_MOBILE_COMMON_USER_USERNAME: ${{ secrets.TESTS_MOBILE_COMMON_USER_USERNAME }} | |
TESTS_MOBILE_LOCAL_APP_PATH: ${{ vars.TESTS_MOBILE_LOCAL_APP_PATH }} | |
TESTS_MOBILE_LOCAL_PLATFORM: ${{ vars.TESTS_MOBILE_LOCAL_PLATFORM }} | |
TESTS_MOBILE_LOCAL_DEVICE: ${{ vars.TESTS_MOBILE_LOCAL_DEVICE }} | |
- name: Trunk Check | |
uses: trunk-io/trunk-action@97ecd21fe6c743bf7a606791584b683a7995c70e # v1.1.9 | |
with: | |
check-mode: all | |
# trunk-token: ${{ secrets.TRUNK_TOKEN }} | |
# arguments: --replace # TODO: remove later - https://features.trunk.io/check/p/uploads-should-not-error-out-if-results-have-already-been-uploaded | |
run_tests: | |
name: Run Tests | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
timeout-minutes: 8 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
- name: Setup NodeJS | |
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0 | |
with: | |
node-version: 20.7.0 | |
cache: npm | |
- name: Install package dependencies | |
run: npm ci --production | |
# - name: Run all tests | |
# run: npm run test | |
# - name: Run backend tests | |
# run: npm run test:api | |
# - name: Run infrastructure tests | |
# run: npm run test:infra | |
# - name: Run mobile tests | |
# run: npm run test:mobile | |
- name: Run web tests | |
run: npm run test:web | |
- name: Upload test artifacts | |
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 | |
if: always() | |
with: | |
name: test-reports | |
path: reports/ | |
retention-days: 30 |