push
Some checks failed
CI/CD Pipeline / test (push) Successful in 11m18s
CI/CD Pipeline / deploy-staging (push) Failing after 2s
CI/CD Pipeline / deploy-main (push) Has been skipped

This commit is contained in:
philipp 2023-11-18 22:22:36 +01:00
parent 70ead9a970
commit 8251d3b648

View File

@ -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: |