ci
This commit is contained in:
parent
f260a25365
commit
a60ada6c08
2 changed files with 28 additions and 30 deletions
|
|
@ -1,13 +1,37 @@
|
||||||
name: "Build and Deploy artifact"
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [master, main]
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
test:
|
||||||
runs-on: docker
|
runs-on: docker
|
||||||
container:
|
container:
|
||||||
image: "git.lab0x13.site/scrow/bazel-java:0.12"
|
image: "git.lab0x13.site/scrow/bazel-java:0.12"
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v7
|
||||||
|
- uses: actions/cache@v6
|
||||||
|
with:
|
||||||
|
path: /var/cache/bazel
|
||||||
|
key: bazel-${{ env.FORGEJO_REPOSITORY }}
|
||||||
|
- id: run-tests
|
||||||
|
env:
|
||||||
|
CACHE_USERNAME: ${{ secrets.CACHE_USERNAME }}
|
||||||
|
CACHE_PASSWORD: ${{ secrets.CACHE_PASSWORD }}
|
||||||
|
run: |
|
||||||
|
bazel \
|
||||||
|
--output_user_root=/var/cache/bazel \
|
||||||
|
test
|
||||||
|
--remote_cache="https://${CACHE_USERNAME}:${CACHE_PASSWORD}@cache.lab0x13.site:443" \
|
||||||
|
--noremote_upload_local_results \
|
||||||
|
--noremote_cache_async \
|
||||||
|
//... --test_output=all
|
||||||
|
|
||||||
|
deploy:
|
||||||
|
needs: test
|
||||||
|
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main'
|
||||||
|
runs-on: docker
|
||||||
|
container:
|
||||||
|
image: "git.lab0x13.site/scrow/bazel-java:0.12"
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v7
|
- uses: actions/checkout@v7
|
||||||
- uses: actions/cache@v6
|
- uses: actions/cache@v6
|
||||||
|
|
@ -29,4 +53,4 @@ jobs:
|
||||||
--remote_cache="https://${CACHE_USERNAME}:${CACHE_PASSWORD}@cache.lab0x13.site:443" \
|
--remote_cache="https://${CACHE_USERNAME}:${CACHE_PASSWORD}@cache.lab0x13.site:443" \
|
||||||
--remote_upload_local_results \
|
--remote_upload_local_results \
|
||||||
--noremote_cache_async
|
--noremote_cache_async
|
||||||
done
|
done
|
||||||
|
|
@ -1,26 +0,0 @@
|
||||||
on:
|
|
||||||
push:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: docker
|
|
||||||
container:
|
|
||||||
image: "git.lab0x13.site/scrow/bazel-java:0.12"
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v7
|
|
||||||
- uses: actions/cache@v6
|
|
||||||
with:
|
|
||||||
path: /var/cache/bazel
|
|
||||||
key: bazel-${{ env.FORGEJO_REPOSITORY }}
|
|
||||||
- id: run-tests
|
|
||||||
env:
|
|
||||||
CACHE_USERNAME: ${{ secrets.CACHE_USERNAME }}
|
|
||||||
CACHE_PASSWORD: ${{ secrets.CACHE_PASSWORD }}
|
|
||||||
run: |
|
|
||||||
bazel \
|
|
||||||
--output_user_root=/var/cache/bazel \
|
|
||||||
test
|
|
||||||
--remote_cache="https://${CACHE_USERNAME}:${CACHE_PASSWORD}@cache.lab0x13.site:443" \
|
|
||||||
--noremote_upload_local_results \
|
|
||||||
--noremote_cache_async \
|
|
||||||
//common/tests:site/lab0x13/scrow/commands/CommandHandlerTest --test_output=all --test_verbose_timeout_warnings
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue