Compare commits
	
		
			No commits in common. "main" and "test" have entirely different histories.
		
	
	
		
	
		
					 1 changed files with 33 additions and 12 deletions
				
			
		
							
								
								
									
										45
									
								
								.github/workflows/test.yml
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										45
									
								
								.github/workflows/test.yml
									
										
									
									
										vendored
									
									
								
							|  | @ -1,19 +1,40 @@ | ||||||
| name: Compile Rust Code on Release | name: Compile Rust Code on Release | ||||||
| 
 | 
 | ||||||
| on: [push] | on: | ||||||
|  |   release: | ||||||
|  |     types: [created] | ||||||
|  | 
 | ||||||
| jobs: | jobs: | ||||||
|   lint&test: |   build: | ||||||
|     runs-on: ubuntu-latest |     runs-on: ubuntu-latest | ||||||
|     container: | 
 | ||||||
|       image: node:alpine |  | ||||||
|     steps: |     steps: | ||||||
|       - uses: actions/checkout@v4 |       - name: Checkout code | ||||||
|       - run: apk add curl gcc rustup cargo rust |         uses: actions/checkout@v2 | ||||||
|       - run: cargo check | 
 | ||||||
|       - run: cargo test |       - name: Set up Rust with Alpine | ||||||
|       - run: cargo build --release          |         run: | | ||||||
|  |           docker run --rm \ | ||||||
|  |             -v ${{ github.workspace }}:/usr/src/myapp \ | ||||||
|  |             -w /usr/src/myapp \ | ||||||
|  |             rust:alpine \ | ||||||
|  |             sh -c "apk add --no-cache musl-dev && cargo build --release" | ||||||
|  | 
 | ||||||
|  |       - name: Run Tests | ||||||
|  |         run: | | ||||||
|  |           docker run --rm \ | ||||||
|  |             -v ${{ github.workspace }}:/usr/src/myapp \ | ||||||
|  |             -w /usr/src/myapp \ | ||||||
|  |             rust:alpine \ | ||||||
|  |             sh -c "apk add --no-cache musl-dev && cargo test --release" | ||||||
|  | 
 | ||||||
|  |       - name: Package Artifacts | ||||||
|  |         run: | | ||||||
|  |           mkdir -p artifacts | ||||||
|  |           cp target/release/your_executable artifacts/ | ||||||
|  |            | ||||||
|       - name: Upload Artifacts |       - name: Upload Artifacts | ||||||
|         uses: actions/upload-artifact@v3 |         uses: actions/upload-artifact@v2 | ||||||
|         with: |         with: | ||||||
|           name: wololo-app |           name: rust-release-artifacts | ||||||
|           path: target/release/wololo |           path: artifacts/ | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue