1 name: Simple CI 2 3 on: [pull_request] 4 5 jobs: 6 lint: 7 name: Lint 8 runs-on: ubuntu-latest 9 steps: 10 - uses: actions/checkout@v3 11 - uses: actions/setup-node@v3 12 with: 13 node-version: 16 14 cache: 'npm' 15 - name: Get changed files 16 id: changed-files 17 uses: tj-actions/changed-files@v35 18 - name: Get changed lang files 19 id: lang-files 20 run: echo "all=$(echo "${{ steps.changed-files.outputs.all_changed_files }}" | grep -oE 'lang\/\S+' | tr '\n' ' ')" >> "$GITHUB_OUTPUT" 21 - run: npm install 22 - name: Check git status 23 run: git status 24 - name: Normalize lang files to ensure sorted 25 if: steps.lang-files.outputs.all 26 run: npm run lang-sort 27 - name: Check lang files are formatted correctly 28 if: steps.lang-files.outputs.all 29 run: npm run lint:lang 30 - name: Check if the git repository is clean 31 run: $(exit $(git status --porcelain --untracked-files=no | head -255 | wc -l)) || (echo "Dirty git tree"; git diff; exit 1) 32 - run: npm run lint:ci && npm run tsc:ci 33 linux-build: 34 name: Build Frontend (Linux) 35 runs-on: ubuntu-latest 36 steps: 37 - uses: actions/checkout@v3 38 - uses: actions/setup-node@v3 39 with: 40 node-version: 16 41 cache: 'npm' 42 - run: npm install 43 - run: make 44 macos-ci: 45 name: Build Frontend (macOS) 46 runs-on: macOS-latest 47 steps: 48 - uses: actions/checkout@v3 49 - uses: actions/setup-node@v3 50 with: 51 node-version: 16 52 cache: 'npm' 53 - run: npm install 54 - run: make 55 android-build: 56 name: Build mobile bundle (Android) 57 runs-on: ubuntu-latest 58 steps: 59 - uses: actions/checkout@v3 60 - uses: actions/setup-node@v3 61 with: 62 node-version: 16 63 cache: 'npm' 64 - run: npm install 65 - run: npx react-native bundle --entry-file react/index.native.js --platform android --bundle-output /tmp/android.bundle --reset-cache 66 ios-build: 67 name: Build mobile bundle (iOS) 68 runs-on: macOS-latest 69 steps: 70 - uses: actions/checkout@v3 71 - uses: actions/setup-node@v3 72 with: 73 node-version: 16 74 cache: 'npm' 75 - run: npm install 76 - run: npx react-native bundle --entry-file react/index.native.js --platform ios --bundle-output /tmp/ios.bundle --reset-cache