forked from Ruderverein-Donau-Linz/rowt
		
	push
This commit is contained in:
		| @@ -13,37 +13,6 @@ env: | ||||
|   SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }} | ||||
|  | ||||
| jobs: | ||||
|   build: | ||||
|     runs-on: ubuntu-latest | ||||
|     container: rust:latest | ||||
|  | ||||
|     steps: | ||||
|       - name: Setup Environment | ||||
|         run: | | ||||
|           rustup target add $CARGO_TARGET | ||||
|           apt-get update -qq && apt-get install -y -qq sshpass musl musl-tools sqlite3 curl gnupg && mkdir -p /etc/apt/keyrings | curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_16.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list && apt-get update && apt-get install nodejs -y && apt-get install npm -y | ||||
|  | ||||
|       - name: Checkout | ||||
|         uses: actions/checkout@v3 | ||||
|  | ||||
|       - name: Run Test DB Script | ||||
|         run: ./test_db.sh | ||||
|  | ||||
|       - name: Build | ||||
|         run: | | ||||
|           cargo build --release --target $CARGO_TARGET | ||||
|           strip target/$CARGO_TARGET/release/rot | ||||
|           cd frontend && npm install && npm run build | ||||
|  | ||||
|       - name: Upload Artifacts | ||||
|         uses: actions/upload-artifact@v3 | ||||
|         with: | ||||
|           name: build-artifacts | ||||
|           path: | | ||||
|             target/$CARGO_TARGET/release/rot | ||||
|             static | ||||
|           retention-days: 1 | ||||
|  | ||||
|   test: | ||||
|     runs-on: ubuntu-latest | ||||
|     container: rust:latest | ||||
| @@ -59,10 +28,10 @@ jobs: | ||||
|       - name: Run Test DB Script | ||||
|         run: ./test_db.sh | ||||
|  | ||||
|       - name: Download Artifacts | ||||
|         uses: actions/download-artifact@v3 | ||||
|         with: | ||||
|           name: build-artifacts | ||||
|       - name: Build | ||||
|         run: | | ||||
|           cargo build  | ||||
|           cd frontend && npm install && npm run build | ||||
|  | ||||
|       - name: Run Tests | ||||
|         run: cargo test --verbose | ||||
| @@ -79,10 +48,11 @@ jobs: | ||||
|       - name: Checkout | ||||
|         uses: actions/checkout@v3 | ||||
|        | ||||
|       - name: Download Artifacts | ||||
|         uses: actions/download-artifact@v3 | ||||
|         with: | ||||
|           name: build-artifacts | ||||
|       - name: Build | ||||
|         run: | | ||||
|           cargo build --release --target $CARGO_TARGET | ||||
|           strip target/$CARGO_TARGET/release/rot | ||||
|           cd frontend && npm install && npm run build | ||||
|  | ||||
|       - name: Deploy to Staging | ||||
|         run: | | ||||
| @@ -112,10 +82,11 @@ jobs: | ||||
|       - name: Checkout | ||||
|         uses: actions/checkout@v3 | ||||
|        | ||||
|       - name: Download Artifacts | ||||
|         uses: actions/download-artifact@v3 | ||||
|         with: | ||||
|           name: build-artifacts | ||||
|       - name: Build | ||||
|         run: | | ||||
|           cargo build --release --target $CARGO_TARGET | ||||
|           strip target/$CARGO_TARGET/release/rot | ||||
|           cd frontend && npm install && npm run build | ||||
|  | ||||
|       - name: Deploy to Main | ||||
|         run: | | ||||
|   | ||||
		Reference in New Issue
	
	Block a user