From 6b0a71ab2a8ca08ec86aa4d8e7da4d0dfc315f7b Mon Sep 17 00:00:00 2001 From: shmyga Date: Wed, 11 Nov 2026 22:40:56 +0300 Subject: [PATCH] ci(action): add test action --- .gitea/workflows/release.yaml | 31 ++++++++++++++++--------------- .gitea/workflows/test.yaml | 26 ++++++++++++++++++++++++++ config.example.json | 2 -- 3 files changed, 42 insertions(+), 17 deletions(-) create mode 100644 .gitea/workflows/test.yaml diff --git a/.gitea/workflows/release.yaml b/.gitea/workflows/release.yaml index ddae2ef..2d138f2 100644 --- a/.gitea/workflows/release.yaml +++ b/.gitea/workflows/release.yaml @@ -17,26 +17,27 @@ jobs: - uses: actions/checkout@v7 - run: echo '' > requirements.txt - uses: https://git.shmyga.ru/InfernalGames/project-manager@master - - name: Restore haxe cache - id: cache-haxe-restore - uses: actions/cache/restore@v6 + - uses: actions/cache/restore@v6 + id: cache-haxe with: - key: ${{ runner.os }}-haxe - path: | - $HOME/sdk - ./build + key: ${{ runner.os }}-haxe-${{ hashFiles('**/haxetool.json') }}-v1 + path: /root/sdk + - uses: actions/cache/restore@v6 + id: cache-haxe-build + with: + key: ${{ runner.os }}-haxe-build + path: ./build - run: echo "${{ secrets.KEY_STORE }}" | base64 --decode > keystore.jks - run: pm build:docker -vv - - name: Save haxe cache - id: cache-haxe-save - #if: always() && steps.cache-haxe-restore.outputs.cache-hit != 'true' - if: always() + - if: steps.cache-haxe.outputs.cache-hit != 'true' uses: actions/cache/save@v6 with: - key: ${{ steps.cache-haxe-restore.outputs.cache-primary-key }} - path: | - $HOME/sdk - ./build + key: ${{ steps.cache-haxe.outputs.cache-primary-key }} + path: /root/sdk + - uses: actions/cache/save@v6 + with: + key: ${{ steps.cache-haxe-build.outputs.cache-primary-key }} + path: ./build - uses: docker/login-action@v4 with: registry: git.shmyga.ru diff --git a/.gitea/workflows/test.yaml b/.gitea/workflows/test.yaml new file mode 100644 index 0000000..be3b848 --- /dev/null +++ b/.gitea/workflows/test.yaml @@ -0,0 +1,26 @@ +name: test + +on: push + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v7 + - run: echo '' > requirements.txt + - uses: https://git.shmyga.ru/InfernalGames/project-manager@master + with: + setup-nodejs: true + - uses: actions/cache/restore@v6 + id: cache-haxe + with: + key: ${{ runner.os }}-haxe-${{ hashFiles('**/haxetool.json') }}-v1 + path: /root/sdk + - if: steps.cache-haxe.outputs.cache-hit != 'true' + run: npx hxt app:flash:setup + - if: steps.cache-haxe.outputs.cache-hit != 'true' + uses: actions/cache/save@v6 + with: + key: ${{ steps.cache-haxe.outputs.cache-primary-key }} + path: /root/sdk + - run: pm lint -vv diff --git a/config.example.json b/config.example.json index 3e23f03..f283f70 100644 --- a/config.example.json +++ b/config.example.json @@ -1,6 +1,4 @@ { - "SdkDir": "$HOME/sdk", - "Develop": false, "UseRuffle": true, "Key": { "store": "keystore.jks",