From 29416efdb0c2327c10f380d060023057077c59bd Mon Sep 17 00:00:00 2001 From: Greg Sarjeant <1686767+gsarjeant@users.noreply.github.com> Date: Wed, 2 Jul 2025 08:22:38 -0400 Subject: [PATCH] Run tests on PR, add initial build action --- .gitea/workflows/build_and_publish.yaml | 20 ++++++++++++++++++++ .gitea/workflows/unit_tests.yaml | 2 +- .gitignore | 5 ++++- 3 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 .gitea/workflows/build_and_publish.yaml diff --git a/.gitea/workflows/build_and_publish.yaml b/.gitea/workflows/build_and_publish.yaml new file mode 100644 index 0000000..7b23e17 --- /dev/null +++ b/.gitea/workflows/build_and_publish.yaml @@ -0,0 +1,20 @@ +name: Run unit tests +run-name: ${{ gitea.repository }} PHP unit tests +on: + push: + tags: + - v*.** + +jobs: + build_and_publish: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Build archive + run: | + tar \ + --exclude='./storage/db' \ + --exclude='./storage/ticks' \ + --exclude='./storage/upload' \ + -czpvf tkr.${{ gitea.ref_name }}.tgz \ + config public src storage templates diff --git a/.gitea/workflows/unit_tests.yaml b/.gitea/workflows/unit_tests.yaml index 4dc8c90..10a4717 100644 --- a/.gitea/workflows/unit_tests.yaml +++ b/.gitea/workflows/unit_tests.yaml @@ -1,6 +1,6 @@ name: Run unit tests run-name: ${{ gitea.repository }} PHP unit tests -on: [push] +on: [push, pull_request] jobs: run-unit-tests: diff --git a/.gitignore b/.gitignore index e13d4a0..2c0188b 100644 --- a/.gitignore +++ b/.gitignore @@ -12,4 +12,7 @@ storage/upload/css # Testing stuff /docker-compose.yml -scratch \ No newline at end of file +scratch + +# Build artifacts +tkr.tgz \ No newline at end of file