Unit tests - @devksingh4 #4
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: Run unit tests | |
| run-name: Unit tests - @${{ github.actor }} | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| test: | |
| permissions: | |
| contents: read | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| name: Run Unit Tests | |
| steps: | |
| - uses: actions/checkout@v4 | |
| env: | |
| HUSKY: "0" | |
| - name: Setup Terraform | |
| uses: hashicorp/setup-terraform@v3 | |
| with: | |
| terraform_version: 1.12.2 | |
| - name: Set up Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22.x | |
| cache: "yarn" | |
| - name: Restore Yarn Cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: node_modules | |
| key: yarn-modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}-dev | |
| restore-keys: | | |
| yarn-modules-${{ runner.arch }}-${{ runner.os }}- | |
| - name: Run unit testing | |
| run: make test_unit | |
| build: | |
| permissions: | |
| contents: read | |
| runs-on: ubuntu-24.04-arm | |
| timeout-minutes: 15 | |
| name: Build Application | |
| steps: | |
| - uses: actions/checkout@v4 | |
| env: | |
| HUSKY: "0" | |
| - name: Set up Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22.x | |
| cache: "yarn" | |
| - name: Restore Yarn Cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: node_modules | |
| key: yarn-modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}-dev | |
| restore-keys: | | |
| yarn-modules-${{ runner.arch }}-${{ runner.os }}- | |
| - name: Run build | |
| run: make build | |
| env: | |
| HUSKY: "0" | |
| RunEnvironment: prod |