diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index 049b403..7fcc697 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -6,7 +6,27 @@ on: - master jobs: + test: + runs-on: production + container: + image: rust:latest + steps: + - name: Install Dependencies + run: | + apt-get update + apt-get install -y git sqlite3 + + - name: Checkout Code + run: | + git config --global --add safe.directory '*' + rm -rf * .git || true + git clone --depth 1 $GITHUB_SERVER_URL/$GITHUB_REPOSITORY.git . + + - name: Run Tests + run: cargo test + deploy: + needs: test runs-on: production steps: - name: Checkout Code diff --git a/.gitea/workflows/test.yml b/.gitea/workflows/test.yml new file mode 100644 index 0000000..7d45e4a --- /dev/null +++ b/.gitea/workflows/test.yml @@ -0,0 +1,33 @@ +name: Continuous Integration + +on: + push: + branches-ignore: + - master + pull_request: + branches: + - master + +jobs: + test: + runs-on: production + container: + image: rust:latest + steps: + - name: Install Dependencies + run: | + apt-get update + apt-get install -y git sqlite3 + + - name: Checkout Code + run: | + git config --global --add safe.directory '*' + rm -rf * .git || true + git clone --depth 1 $GITHUB_SERVER_URL/$GITHUB_REPOSITORY.git . + + - name: Check Formatting + run: cargo fmt -- --check || echo "Formatting issues found, but proceeding anyway for now" + + - name: Run Tests + # We explicitly set SQLx offline mode just in case, though our tests use an in-memory DB + run: cargo test