name: Test Suite on: [push] jobs: nui_preformatting_tests: name: Tests for NUI runs-on: ubuntu-latest defaults: run: working-directory: phone steps: - name: Checkout uses: actions/checkout@v2 with: # Make sure the actual branch is checked out when running on pull requests ref: ${{ github.head_ref }} # This is important to fetch the changes to the previous commit fetch-depth: 0 - name: Get yarn cache directory path id: yarn-cache-dir-path run: echo "::set-output name=dir::$(yarn config get cacheFolder)" - uses: actions/cache@v2 id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) with: path: ${{ steps.yarn-cache-dir-path.outputs.dir }} key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} restore-keys: | ${{ runner.os }}-yarn- - name: Use Node.js uses: actions/setup-node@v1 with: node-version: '14.x' - name: Install dependencies NUI run: yarn --frozen-lockfile - name: Run Enzyme Tests run: yarn test env: CI: true game_scripts_test: name: Tests for Game Scripts runs-on: ubuntu-latest defaults: run: working-directory: resources steps: - name: Checkout uses: actions/checkout@v2 with: # Make sure the actual branch is checked out when running on pull requests ref: ${{ github.head_ref }} # This is important to fetch the changes to the previous commit fetch-depth: 0 - name: Use Node.js uses: actions/setup-node@v1 with: node-version: '14.x' - name: Install dependencies NUI run: yarn --frozen-lockfile - name: Run Jest Tests run: yarn test env: CI: true