tools: test all languages in CI (#41512)
* tools: test all languages in CI Co-authored-by: Mrugesh Mohapatra <1884376+raisedadead@users.noreply.github.com>
This commit is contained in:
		
				
					committed by
					
						
						GitHub
					
				
			
			
				
	
			
			
			
						parent
						
							79fcc28faf
						
					
				
				
					commit
					275e12ba80
				
			
							
								
								
									
										50
									
								
								.github/workflows/node.js-tests.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										50
									
								
								.github/workflows/node.js-tests.yml
									
									
									
									
										vendored
									
									
								
							@@ -84,3 +84,53 @@ jobs:
 | 
			
		||||
 | 
			
		||||
      - name: Run Tests
 | 
			
		||||
        run: npm test
 | 
			
		||||
 | 
			
		||||
  test-localization:
 | 
			
		||||
    name: Localize
 | 
			
		||||
    needs: lint
 | 
			
		||||
    runs-on: ubuntu-18.04
 | 
			
		||||
 | 
			
		||||
    strategy:
 | 
			
		||||
      matrix:
 | 
			
		||||
        node-version: [14.x]
 | 
			
		||||
        locale: [chinese, espanol]
 | 
			
		||||
 | 
			
		||||
    steps:
 | 
			
		||||
      - name: Checkout Source Files
 | 
			
		||||
        uses: actions/checkout@v2
 | 
			
		||||
 | 
			
		||||
      - name: Use Node.js ${{ matrix.node-version }}
 | 
			
		||||
        uses: actions/setup-node@v2
 | 
			
		||||
        with:
 | 
			
		||||
          node-version: ${{ matrix.node-version }}
 | 
			
		||||
 | 
			
		||||
      - name: Cache node modules
 | 
			
		||||
        uses: actions/cache@v2
 | 
			
		||||
        env:
 | 
			
		||||
          cache-name: cache-node-modules
 | 
			
		||||
        with:
 | 
			
		||||
          # npm cache files are stored in `~/.npm` on Linux/macOS
 | 
			
		||||
          path: ~/.npm
 | 
			
		||||
          key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
 | 
			
		||||
          restore-keys: |
 | 
			
		||||
            ${{ runner.os }}-build-${{ env.cache-name }}-
 | 
			
		||||
            ${{ runner.os }}-build-
 | 
			
		||||
            ${{ runner.os }}-
 | 
			
		||||
 | 
			
		||||
      - name: Set Environment variables
 | 
			
		||||
        run: cp sample.env .env
 | 
			
		||||
 | 
			
		||||
      - name: Install Dependencies
 | 
			
		||||
        env:
 | 
			
		||||
          CURRICULUM_LOCALE: ${{ matrix.locale }}
 | 
			
		||||
          CLIENT_LOCALE: ${{ matrix.locale }}
 | 
			
		||||
        run: |
 | 
			
		||||
          npm ci
 | 
			
		||||
          npm run ensure-env
 | 
			
		||||
          npm run build:curriculum
 | 
			
		||||
 | 
			
		||||
      - name: Run Tests
 | 
			
		||||
        env:
 | 
			
		||||
          CURRICULUM_LOCALE: ${{ matrix.locale }}
 | 
			
		||||
          CLIENT_LOCALE: ${{ matrix.locale }}
 | 
			
		||||
        run: npm test
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user