From 8c56bba864e3c8867635e08c930734e864ee5a0c Mon Sep 17 00:00:00 2001 From: keylogic1 <119584546+keylogic1@users.noreply.github.com> Date: Tue, 9 Jan 2024 18:14:02 +0200 Subject: [PATCH 1/3] Create cache.yml --- .github/workflows/cache.yml | 38 +++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/cache.yml diff --git a/.github/workflows/cache.yml b/.github/workflows/cache.yml new file mode 100644 index 00000000..a8960135 --- /dev/null +++ b/.github/workflows/cache.yml @@ -0,0 +1,38 @@ +--- +# yamllint disable rule:line-length +name: Clear cache + +on: + schedule: + - cron: '30 1 * * 1-5' + workflow_dispatch: + +jobs: + job1: + name: Clear Docker + if: always() + runs-on: ${{ matrix.runner_label }} + strategy: + matrix: + runner_label: ${{ fromJSON('["lionco-runner-1", "lionco-runner-2", "lionco-runner-3", "lionco-runner-4", "lionco-runner-5", "lionco-runner-6"]') }} + steps: + - name: Stop old containers + run: docker ps -q | grep -q . && docker stop $(docker ps -q) || echo "No containers to stop" + - name: Remove old containers + run: docker ps -a -q | grep -q . && docker rm $(docker ps -a -q) || echo "No containers to remove" + - name: Delete old images + run: docker system prune --volumes --all --force + job2: + name: Clear workspaces + if: always() + needs: job1 + runs-on: ${{ matrix.runner_label }} + strategy: + matrix: + runner_label: ${{ fromJSON('["lionco-runner-1", "lionco-runner-2", "lionco-runner-3", "lionco-runner-4", "lionco-runner-5", "lionco-runner-6"]') }} + steps: + - uses: xembly/workflow-manager@v1 + with: + token: ${{ secrets.GITHUB_TOKEN }} + run: clean + verbose: true From 00dd13f709d5aafd54095ae106085d8736aa36e7 Mon Sep 17 00:00:00 2001 From: keylogic1 <119584546+keylogic1@users.noreply.github.com> Date: Tue, 9 Jan 2024 21:30:21 +0200 Subject: [PATCH 2/3] Update tests.yml Use GO --- .github/workflows/tests.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index fd9e36dd..b1c715cc 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -71,6 +71,11 @@ jobs: node-version: '18.16.1' cache: 'yarn' cache-dependency-path: integration_tests/yarn.lock + - name: Setup Go environment + uses: actions/setup-go@v5.0.0 + with: + go-version: 1.20 + cache: false - name: Lint run: cd integration_tests && yarn --ignore-engines && yarn lint # - name: Build images @@ -86,4 +91,4 @@ jobs: run: | cd integration_tests yarn vitest ./src --run --shard 1/2 --bail 1 - yarn vitest ./src --run --shard 2/2 --bail 1 \ No newline at end of file + yarn vitest ./src --run --shard 2/2 --bail 1 From 7d025bcd8066ff0f984396553c8a3f65a513d19d Mon Sep 17 00:00:00 2001 From: keylogic1 <119584546+keylogic1@users.noreply.github.com> Date: Tue, 9 Jan 2024 21:58:02 +0200 Subject: [PATCH 3/3] Update Makefile Ensure files are owned by runner user --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index 79ef51f1..a99ff025 100644 --- a/Makefile +++ b/Makefile @@ -20,6 +20,7 @@ compile: --mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \ --platform linux/amd64 \ cosmwasm/workspace-optimizer:0.15.0 + @sudo chown -R $(shell id -u):$(shell id -g) artifacts check_contracts: @cargo install cosmwasm-check