Compare commits
10 Commits
865c55cd18
...
22ee941ce0
Author | SHA1 | Date | |
---|---|---|---|
22ee941ce0 | |||
6bee538b55 | |||
88d533c838 | |||
57c1e13c14 | |||
ba132a5735 | |||
0794671707 | |||
d0adee74da | |||
5fec65e38f | |||
0b7711ed91 | |||
7be76f3ce8 |
@ -11,23 +11,23 @@ env:
|
|||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container: git.hofer.link/ruderverein-donau-linz/rowing-ci:20240117
|
container: git.hofer.link/ruderverein-donau-linz/rowing-ci:20240118
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- name: Run Test DB Script
|
- name: Run Test DB Script
|
||||||
run: ./test_db.sh
|
run: ./test_db.sh
|
||||||
|
|
||||||
- name: Set up cargo cache
|
- name: Set up cargo cache
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v3
|
||||||
continue-on-error: false
|
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
~/.cargo/bin/
|
~/.cargo/bin/
|
||||||
~/.cargo/registry/index/
|
~/.cargo/registry/index/
|
||||||
~/.cargo/registry/cache/
|
~/.cargo/registry/cache/
|
||||||
~/.cargo/git/db/
|
~/.cargo/git/db/
|
||||||
target/
|
target/
|
||||||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
key: ${{ runner.os }}-cargo-debug-${{ hashFiles('**/Cargo.lock') }}
|
||||||
restore-keys: ${{ runner.os }}-cargo-
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: |
|
run: |
|
||||||
cargo build
|
cargo build
|
||||||
@ -46,7 +46,7 @@ jobs:
|
|||||||
|
|
||||||
deploy-staging:
|
deploy-staging:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container: git.hofer.link/ruderverein-donau-linz/rowing-ci:20240117
|
container: git.hofer.link/ruderverein-donau-linz/rowing-ci:20240118
|
||||||
needs: [test]
|
needs: [test]
|
||||||
if: github.ref == 'refs/heads/staging'
|
if: github.ref == 'refs/heads/staging'
|
||||||
steps:
|
steps:
|
||||||
@ -58,16 +58,14 @@ jobs:
|
|||||||
|
|
||||||
- name: Set up cargo cache
|
- name: Set up cargo cache
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v3
|
||||||
continue-on-error: false
|
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
~/.cargo/bin/
|
~/.cargo/bin/
|
||||||
~/.cargo/registry/index/
|
~/.cargo/registry/index/
|
||||||
~/.cargo/registry/cache/
|
~/.cargo/registry/cache/
|
||||||
~/.cargo/git/db/
|
~/.cargo/git/db/
|
||||||
target/
|
target/
|
||||||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
key: ${{ runner.os }}-cargo-release-${{ hashFiles('**/Cargo.lock') }}
|
||||||
restore-keys: ${{ runner.os }}-cargo-
|
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: |
|
run: |
|
||||||
@ -99,7 +97,7 @@ jobs:
|
|||||||
|
|
||||||
deploy-main:
|
deploy-main:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container: git.hofer.link/ruderverein-donau-linz/rowing-ci:latest
|
container: git.hofer.link/ruderverein-donau-linz/rowing-ci:20240118
|
||||||
needs: [test]
|
needs: [test]
|
||||||
if: github.ref == 'refs/heads/main'
|
if: github.ref == 'refs/heads/main'
|
||||||
steps:
|
steps:
|
||||||
@ -108,19 +106,17 @@ jobs:
|
|||||||
|
|
||||||
- name: Run Test DB Script
|
- name: Run Test DB Script
|
||||||
run: ./test_db.sh
|
run: ./test_db.sh
|
||||||
|
|
||||||
- name: Set up cargo cache
|
- name: Set up cargo cache
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v3
|
||||||
continue-on-error: false
|
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
~/.cargo/bin/
|
~/.cargo/bin/
|
||||||
~/.cargo/registry/index/
|
~/.cargo/registry/index/
|
||||||
~/.cargo/registry/cache/
|
~/.cargo/registry/cache/
|
||||||
~/.cargo/git/db/
|
~/.cargo/git/db/
|
||||||
target/
|
target/
|
||||||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
key: ${{ runner.os }}-cargo-release-${{ hashFiles('**/Cargo.lock') }}
|
||||||
restore-keys: ${{ runner.os }}-cargo-
|
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: |
|
run: |
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
# 2. Tag the image: `docker tag <id> git.hofer.link/ruderverein-donau-linz/rowing-ci:<date>`
|
# 2. Tag the image: `docker tag <id> git.hofer.link/ruderverein-donau-linz/rowing-ci:<date>`
|
||||||
# 3. Push the image: `docker push git.hofer.link/ruderverein-donau-linz/rowing-ci:<date>`
|
# 3. Push the image: `docker push git.hofer.link/ruderverein-donau-linz/rowing-ci:<date>`
|
||||||
|
|
||||||
|
|
||||||
FROM rust:1.75.0
|
FROM rust:1.75.0
|
||||||
|
|
||||||
RUN apt-get update && apt-get install -y sqlite3
|
RUN apt-get update && apt-get install -y sqlite3
|
||||||
@ -20,3 +21,6 @@ RUN npx playwright install --with-deps
|
|||||||
# deployment
|
# deployment
|
||||||
RUN rustup target add x86_64-unknown-linux-musl
|
RUN rustup target add x86_64-unknown-linux-musl
|
||||||
RUN apt-get install -y -qq pkg-config sshpass musl musl-tools curl gnupg libssl-dev
|
RUN apt-get install -y -qq pkg-config sshpass musl musl-tools curl gnupg libssl-dev
|
||||||
|
|
||||||
|
# TEMPORARY act workaround (otherwise gitea cache is not working)
|
||||||
|
RUN apt-get install -y zstd
|
||||||
|
@ -1,17 +1,14 @@
|
|||||||
# Build
|
# Build
|
||||||
|
|
||||||
## Frontend
|
## Frontend
|
||||||
1. `cd frontend`
|
1. `cd frontend`
|
||||||
2. `npm install`
|
2. `npm install`
|
||||||
3. `npm run (watch/build)`
|
3. `npm run (watch/build)`
|
||||||
|
|
||||||
# Run
|
# Run
|
||||||
|
|
||||||
## Backend
|
## Backend
|
||||||
1. `cargo r`
|
1. `cargo r`
|
||||||
|
|
||||||
# Test
|
# Test
|
||||||
|
|
||||||
## Frontend
|
## Frontend
|
||||||
- `npx playwright test --workers 1 --project firefox`
|
- `npx playwright test --workers 1 --project firefox`
|
||||||
- Nice UI: `--ui`
|
- Nice UI: `--ui`
|
||||||
@ -19,4 +16,3 @@
|
|||||||
|
|
||||||
## Backend (Unit + Integration)
|
## Backend (Unit + Integration)
|
||||||
`cargo t`
|
`cargo t`
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user