mirror of
				https://gitea.com/actions/setup-node.git
				synced 2025-11-04 05:39:04 +08:00 
			
		
		
		
	add e2e
This commit is contained in:
		
							
								
								
									
										81
									
								
								.github/workflows/yarn-subprojects.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										81
									
								
								.github/workflows/yarn-subprojects.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,81 @@
 | 
			
		||||
# This is a basic workflow to help you get started with Actions
 | 
			
		||||
 | 
			
		||||
name: CI
 | 
			
		||||
 | 
			
		||||
on:
 | 
			
		||||
  push:
 | 
			
		||||
 | 
			
		||||
  workflow_dispatch:
 | 
			
		||||
 | 
			
		||||
jobs:
 | 
			
		||||
  build:
 | 
			
		||||
    strategy:
 | 
			
		||||
      matrix:
 | 
			
		||||
        node-version: [16]
 | 
			
		||||
    runs-on: ubuntu-latest
 | 
			
		||||
 | 
			
		||||
    steps:
 | 
			
		||||
      - uses: actions/checkout@v3
 | 
			
		||||
 | 
			
		||||
      - name: prepare sub-projects
 | 
			
		||||
        env:
 | 
			
		||||
          YARN_ENABLE_IMMUTABLE_INSTALLS: false
 | 
			
		||||
        run: |
 | 
			
		||||
          echo "create yarn2 project in the sub2"
 | 
			
		||||
          mkdir sub2
 | 
			
		||||
          cd sub2
 | 
			
		||||
          cat <<EOT >package.json
 | 
			
		||||
          {
 | 
			
		||||
            "name": "subproject",
 | 
			
		||||
            "dependencies": {
 | 
			
		||||
              "random": "^3.0.6",
 | 
			
		||||
              "uuid": "^9.0.0"
 | 
			
		||||
            }
 | 
			
		||||
          }
 | 
			
		||||
          EOT
 | 
			
		||||
          yarn set version 2.4.3
 | 
			
		||||
          yarn install
 | 
			
		||||
 | 
			
		||||
          echo "create yarn3 project in the sub3"
 | 
			
		||||
          cd ..
 | 
			
		||||
          mkdir sub3
 | 
			
		||||
          cd sub3
 | 
			
		||||
          cat <<EOT >package.json
 | 
			
		||||
          {
 | 
			
		||||
            "name": "subproject",
 | 
			
		||||
            "dependencies": {
 | 
			
		||||
              "random": "^3.0.6",
 | 
			
		||||
              "uuid": "^9.0.0"
 | 
			
		||||
            }
 | 
			
		||||
          }
 | 
			
		||||
          EOT
 | 
			
		||||
          yarn set version 3.5.1
 | 
			
		||||
          yarn install
 | 
			
		||||
 | 
			
		||||
          echo "create yarn1 project in the root"
 | 
			
		||||
          cd ..
 | 
			
		||||
          cat <<EOT >package.json
 | 
			
		||||
          {
 | 
			
		||||
            "name": "subproject",
 | 
			
		||||
            "dependencies": {
 | 
			
		||||
              "random": "^3.0.6",
 | 
			
		||||
              "uuid": "^9.0.0"
 | 
			
		||||
            }
 | 
			
		||||
          }
 | 
			
		||||
          EOT
 | 
			
		||||
          yarn set version 1.22.19
 | 
			
		||||
          yarn install
 | 
			
		||||
 | 
			
		||||
      # expect
 | 
			
		||||
      #  - no errors
 | 
			
		||||
      #  - log
 | 
			
		||||
      #    ##[debug]Cache Paths:
 | 
			
		||||
      #    ##[debug]["sub2/.yarn/cache","sub3/.yarn/cache","../../../.cache/yarn/v6"]
 | 
			
		||||
      - name: Setup Node
 | 
			
		||||
        uses: ./
 | 
			
		||||
        with:
 | 
			
		||||
          node-version: ${{ matrix.node-version }}
 | 
			
		||||
          cache: 'yarn'
 | 
			
		||||
          cache-dependency-path: |
 | 
			
		||||
            **/*.lock
 | 
			
		||||
            yarn.lock
 | 
			
		||||
		Reference in New Issue
	
	Block a user