From a48a91292ca1d2ad5ea6ed8d84e3dc34c0db6b9d Mon Sep 17 00:00:00 2001 From: Johannes Ziemke Date: Mon, 11 Mar 2024 16:04:41 +0100 Subject: [PATCH] TEMP: Only run release --- .github/workflows/docs-rebuild.yaml | 21 ------ .github/workflows/generate-image-build-matrix | 24 ------ .github/workflows/images.yaml | 73 ------------------- .github/workflows/release.yaml | 1 + .github/workflows/test.yaml | 20 ----- .github/workflows/test_agents.yaml | 10 --- 6 files changed, 1 insertion(+), 148 deletions(-) delete mode 100644 .github/workflows/docs-rebuild.yaml delete mode 100755 .github/workflows/generate-image-build-matrix delete mode 100644 .github/workflows/images.yaml delete mode 100644 .github/workflows/test.yaml delete mode 100644 .github/workflows/test_agents.yaml diff --git a/.github/workflows/docs-rebuild.yaml b/.github/workflows/docs-rebuild.yaml deleted file mode 100644 index 21c9a27d..00000000 --- a/.github/workflows/docs-rebuild.yaml +++ /dev/null @@ -1,21 +0,0 @@ -name: docs-rebuild-deploy - -on: - push: - branches: - - main - - release-2.1 - -jobs: - docs-rebuild-deploy: - runs-on: ubuntu-22.04 - permissions: write-all - steps: - - name: Repository Dispatch - run: | - curl -H "Accept: application/vnd.github.everest-preview+json" \ - -H "Authorization: token ${{ secrets.ALEXPALMS_DOCS_TOKEN }}" \ - --request POST \ - --data '{"event_type": "rebuild-deploy", "client_payload": {}}' https://api.github.com/repos/diambra/docs/dispatches - - diff --git a/.github/workflows/generate-image-build-matrix b/.github/workflows/generate-image-build-matrix deleted file mode 100755 index 92d759f5..00000000 --- a/.github/workflows/generate-image-build-matrix +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/bash -set -euo pipefail - -for dir in "$@"; do - [[ -f "$dir/Dockerfile" ]] || continue - name="$(basename "$dir")" - for arg in "$dir/"*.arg; do - arg_base="$(basename "$arg")" - arg_name=${arg_base%.arg} - for a in $(cat "$arg"); do - jq -n \ - --arg dir "$dir" \ - --arg name "${name//_/-}" \ - --arg arg_name "$arg_name" \ - --arg a "$a" \ - --arg build_args "$arg_name=$a" \ - '{ - "dir": $dir, - "name": ($name + "-" + $arg_name + $a), - "build_args": ($arg_name + "=" + $a) - }' - done - done -done | jq -c -r -s '.' diff --git a/.github/workflows/images.yaml b/.github/workflows/images.yaml deleted file mode 100644 index 1e415718..00000000 --- a/.github/workflows/images.yaml +++ /dev/null @@ -1,73 +0,0 @@ -on: - push: {} - workflow_dispatch: {} - -jobs: - generate-matrix: - name: Generate build matrix - runs-on: ubuntu-latest - outputs: - matrix: ${{ steps.set-matrix.outputs.matrix }} - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - id: set-matrix - run: echo "::set-output name=matrix::$(./.github/workflows/generate-image-build-matrix images/*)" - - build-and-push-arena-images: - needs: [generate-matrix] - runs-on: ubuntu-latest - if: ${{ needs.generate-matrix.outputs.matrix != '[]' }} - strategy: - fail-fast: true - matrix: - include: ${{ fromJson(needs.generate-matrix.outputs.matrix) }} - - steps: - - name: Checkout - uses: actions/checkout@v2 - - - name: Login to GHCR - uses: docker/login-action@v2 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - name: Login to Docker Hub - uses: docker/login-action@v2 - with: - registry: docker.io - username: diambrabot - password: ${{ secrets.DOCKERHUB_TOKEN }} - - - name: Login to Quay - uses: docker/login-action@v2 - with: - registry: quay.io - username: diambra+github - password: ${{ secrets.QUAY_TOKEN }} - - - name: Docker meta - id: meta - uses: docker/metadata-action@v4 - with: - images: | - ghcr.io/diambra/arena-${{ matrix.name }} - docker.io/diambra/arena-${{ matrix.name }} - quay.io/diambra/arena-${{ matrix.name }} - tags: | - type=ref,event=branch - type=semver,pattern=v{{version}} - type=semver,pattern=v{{major}}.{{minor}} - type=raw,value=latest,enable={{is_default_branch}} - - - name: Build and push arena ${{ matrix.dir }} - uses: docker/build-push-action@v3 - with: - context: . - file: ${{ matrix.dir }}/Dockerfile - push: true - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} - build-args: ${{ matrix.build_args }} \ No newline at end of file diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 24c9e89c..c38d27f9 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -4,6 +4,7 @@ on: - "v*.*.*" branches: - main + - fix-release pull_request: {} jobs: diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml deleted file mode 100644 index aa92c8a1..00000000 --- a/.github/workflows/test.yaml +++ /dev/null @@ -1,20 +0,0 @@ -on: - pull_request: {} - workflow_dispatch: {} - -jobs: - test: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 - with: - python-version: "3.10" # Need to limit to specific python version because of 3.12 fails with `pip install .["tests"]` - - run: python3 -m pip install wheel - - run: python3 -m pip install .["tests"] - - run: pytest tests/test_gym_settings.py - - run: pytest tests/test_wrappers_settings.py - - run: pytest tests/test_recording_settings.py - - run: pytest tests/test_examples.py - - run: pytest -k "test_speed_gym_mock or test_speed_wrappers_mock" tests/test_speed.py # Run only mocked tests - - run: pytest -k "test_random_gym_mock or test_random_wrappers_mock" tests/test_random.py # Run only mocked tests diff --git a/.github/workflows/test_agents.yaml b/.github/workflows/test_agents.yaml deleted file mode 100644 index e2cc8cff..00000000 --- a/.github/workflows/test_agents.yaml +++ /dev/null @@ -1,10 +0,0 @@ -on: - pull_request: {} - workflow_dispatch: {} - -jobs: - test: - uses: diambra/agents/.github/workflows/reusable_unit_tests.yaml@main - with: - arena_requirement_specifier: 'git+https://github.com/diambra/arena.git@${{ github.ref }}#egg=' - agents_ref: 'main'