From 8251d3b6484f9ec5a9fa3421069ed8ec32284c3c Mon Sep 17 00:00:00 2001 From: philipp Date: Sat, 18 Nov 2023 22:22:36 +0100 Subject: [PATCH] push --- .gitea/workflows/action.yml | 57 +++++++++---------------------------- 1 file changed, 14 insertions(+), 43 deletions(-) diff --git a/.gitea/workflows/action.yml b/.gitea/workflows/action.yml index 90def89..e91235a 100644 --- a/.gitea/workflows/action.yml +++ b/.gitea/workflows/action.yml @@ -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: |