Monorepo CI #49
This file contains hidden or 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: Monorepo CI | |
| on: | |
| push: | |
| branches: [ master ] | |
| pull_request: | |
| branches: [ master ] | |
| schedule: | |
| - cron: '0 0 * * 0' # Runs at 00:00 UTC every Sunday | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node-version: [20.x] | |
| python-version: ['3.8'] | |
| ruby-version: ['3.2'] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| # Setup Node.js | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| # Setup pnpm | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v2 | |
| with: | |
| version: latest | |
| run_install: false | |
| # Setup Python | |
| - name: Setup Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: | | |
| 3.8 | |
| 3.11 | |
| cache: 'pip' | |
| # Install PortAudio | |
| - name: Install PortAudio | |
| run: sudo apt-get update && sudo apt-get install -y portaudio19-dev | |
| - name: Upgrade pip | |
| run: python -m pip install --upgrade pip | |
| # Setup uv | |
| - name: Install uv | |
| run: | | |
| curl -LsSf https://astral.sh/uv/install.sh | sh | |
| echo "$HOME/.cargo/bin" >> $GITHUB_PATH | |
| # Setup Ruby | |
| - name: Setup Ruby | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: ${{ matrix.ruby-version }} | |
| bundler-cache: true | |
| - name: Set up JDK 8 | |
| uses: actions/setup-java@v2 | |
| with: | |
| java-version: '8' | |
| distribution: 'temurin' | |
| - name: Install Android SDK | |
| run: | | |
| # Install required packages | |
| sudo apt-get update | |
| sudo apt-get install -y wget unzip | |
| # Download and install Android SDK | |
| mkdir -p $HOME/Android/Sdk | |
| wget -q https://dl.google.com/android/repository/sdk-tools-linux-4333796.zip | |
| unzip sdk-tools-linux-4333796.zip -d $HOME/Android/Sdk | |
| rm sdk-tools-linux-4333796.zip | |
| # Accept licenses | |
| yes | $HOME/Android/Sdk/tools/bin/sdkmanager --licenses | |
| # Install the necessary Android SDK components | |
| $HOME/Android/Sdk/tools/bin/sdkmanager "platform-tools" "build-tools;25.0.3" "platforms;android-25" | |
| - name: Install dependencies | |
| run: | | |
| # Install pnpm dependencies | |
| pnpm install | |
| - name: Cache Nx cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: .nx/cache | |
| key: ${{ runner.os }}-nx-${{ github.sha }} | |
| restore-keys: | | |
| ${{ runner.os }}-nx- | |
| # Run tests | |
| - name: Run tests | |
| run: echo "Do nothing for now" |