diff --git a/.gitea/workflows/action.yml b/.gitea/workflows/action.yml index 92e5b4e..373a3a0 100644 --- a/.gitea/workflows/action.yml +++ b/.gitea/workflows/action.yml @@ -16,13 +16,25 @@ jobs: - uses: actions/checkout@v3 - name: Run Test DB Script run: ./test_db.sh + - name: Set up cargo cache + uses: actions/cache@v3 + continue-on-error: false + with: + path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + target/ + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} + restore-keys: ${{ runner.os }}-cargo- - name: Build run: | cargo build cd frontend && npm install && npm run build - - name: Run Playwright tests + - name: Frontend tests run: cd frontend && npx playwright test --workers 1 - - name: Run Tests + - name: Backend tests run: cargo test --verbose #- uses: actions/upload-artifact@v3 # if: always() @@ -44,6 +56,19 @@ jobs: - name: Run Test DB Script run: ./test_db.sh + - name: Set up cargo cache + uses: actions/cache@v3 + continue-on-error: false + with: + path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + target/ + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} + restore-keys: ${{ runner.os }}-cargo- + - name: Build run: | cargo build --release --target $CARGO_TARGET @@ -84,6 +109,19 @@ jobs: - name: Run Test DB Script run: ./test_db.sh + - name: Set up cargo cache + uses: actions/cache@v3 + continue-on-error: false + with: + path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + target/ + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} + restore-keys: ${{ runner.os }}-cargo- + - name: Build run: | cargo build --release --target $CARGO_TARGET diff --git a/Dockerfile b/Dockerfile index 081b6f8..92d1e73 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,8 +2,8 @@ # Process to renew it: # 0. Login to gitea docker registry: `docker login git.hofer.link` # 1. Build the image `docker build .` -# 2. Tag the image: `docker tag git.hofer.link/ruderverein-donau-linz/rowing-ci:latest` -# 3. Push the image: `docker push git.hofer.link/ruderverein-donau-linz/rowing-ci:latest` +# 2. Tag the image: `docker tag git.hofer.link/ruderverein-donau-linz/rowing-ci:` +# 3. Push the image: `docker push git.hofer.link/ruderverein-donau-linz/rowing-ci:` FROM rust:1.75.0