Weekly Cron Develop #2
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: Weekly Cron Develop | |
on: | |
schedule: | |
- cron: '0 0 * * MON' # every week at 00:00 on Monday | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
ref: develop | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: .nvmrc | |
- name: Cache dependencies | |
uses: actions/cache@v4 | |
with: | |
path: | | |
**/node_modules | |
.yarn/cache | |
.yarn/install-state.gz | |
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-yarn- | |
- name: Install dependencies | |
run: yarn install | |
- name: Run tests | |
run: yarn test | |
- name: Setup EAS | |
uses: expo/expo-github-action@v8 | |
with: | |
eas-version: latest | |
token: ${{ secrets.EXPO_TOKEN }} | |
- name: Create preview | |
uses: expo/expo-github-action/preview@v8 | |
id: preview | |
with: | |
command: eas update --auto | |
comment: false | |
- name: E2E tests with Maestro | |
run: | | |
curl -Ls "https://get.maestro.mobile.dev" | bash | |
export PATH="$PATH":"$HOME/.maestro/bin" | |
yarn test:e2e:ci:ios --ios-update-id ${{ steps.preview.outputs.iosId }} --apiKey ${{ secrets.MAESTRO_API_KEY }} --tags pr,weekly --name Weekly | |
yarn test:e2e:ci:android --android-update-id ${{ steps.preview.outputs.androidId }} --apiKey ${{ secrets.MAESTRO_API_KEY }} --tags pr,weekly --name Weekly |