add G-Research badge #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Python Airflow Operator | |
on: | |
push: | |
branches-ignore: | |
- master | |
paths: | |
- '.github/workflows/airflow-operator.yml' | |
- '.github/workflows/python-client.yml' | |
- '.github/workflows/python-tests/*' | |
- 'build/airflow-operator/**' | |
- 'build/python-client/**' | |
- 'client/python/**' | |
- 'docs/python_airflow_operator.md' | |
- 'docs/python_armada_client.md' | |
- 'internal/jobservice/*' | |
- 'pkg/api/*.proto' | |
- 'pkg/api/jobservice/*.proto' | |
- 'scripts/build-airflow-operator.sh' | |
- 'scripts/build-python-client.sh' | |
- 'third_party/airflow/**' | |
- './magefiles/tests.go' | |
- './magefiles/python.go' | |
pull_request: | |
branches-ignore: | |
- gh-pages | |
paths: | |
- '.github/workflows/airflow-operator.yml' | |
- '.github/workflows/python-client.yml' | |
- '.github/workflows/python-tests/*' | |
- 'build/airflow-operator/**' | |
- 'build/python-client/**' | |
- 'client/python/**' | |
- 'docs/python_airflow_operator.md' | |
- 'docs/python_armada_client.md' | |
- 'internal/jobservice/*' | |
- 'pkg/api/*.proto' | |
- 'pkg/api/jobservice/*.proto' | |
- 'scripts/build-airflow-operator.sh' | |
- 'scripts/build-python-client.sh' | |
- 'third_party/airflow/**' | |
jobs: | |
airflow-tox: | |
runs-on: ubuntu-22.04 | |
strategy: | |
matrix: | |
go: [ '1.20' ] | |
python: [ '3.8', '3.9', '3.10' ] | |
include: | |
- tox-env: 'py38' | |
- tox-env: 'py39' | |
python: '3.9' | |
- tox-env: 'py310' | |
python: '3.10' | |
steps: | |
- uses: actions/[email protected] | |
- uses: ./.github/workflows/go-setup | |
- name: Install Protoc | |
uses: arduino/setup-protoc@v2 | |
with: | |
version: '23.3' | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
- run: go run github.com/magefile/[email protected] -v airflowOperator | |
- uses: ./.github/workflows/python-tests | |
with: | |
python-version: ${{ matrix.python }} | |
tox-env: ${{ matrix.tox-env }} | |
path: third_party/airflow | |
github-token: ${{secrets.GITHUB_TOKEN}} | |
airflow-integration-tests: | |
if: github.repository_owner == 'armadaproject' | |
strategy: | |
fail-fast: false | |
matrix: | |
# WARN(JayF): If we begin attempting to support >1 golang version, | |
# we'll have to ensure that we don't use the same artifact name for | |
# both versions in the matrix -- this will lead to them overwriting | |
# each other. | |
go: [ '1.20' ] | |
# As of December 2022, using 8vcpu runners is slower overall, | |
# due to longer queue times. | |
runs-on: ubuntu-22.04 | |
env: | |
# Cache Docker layers in the Github actions cache. | |
# These variables are picked up by the goreleaser config. | |
DOCKER_BUILDX_CACHE_FROM: "type=gha" | |
DOCKER_BUILDX_CACHE_TO: "type=gha,mode=max" | |
DOCKER_BUILDX_BUILDER: "builder" | |
steps: | |
- uses: actions/[email protected] | |
- run: docker buildx create --name ${DOCKER_BUILDX_BUILDER} --driver docker-container --use | |
- run: docker buildx install | |
- uses: actions/setup-go@v4 | |
id: setup-go | |
with: | |
go-version: ${{ matrix.go }} | |
- name: Compute tools cache info | |
id: tools-cache-info | |
run: echo path=$(go env GOPATH)/bin >> $GITHUB_OUTPUT | |
- name: Setup tools cache | |
uses: actions/cache@v3 | |
id: tools-cache | |
with: | |
path: ${{ steps.tools-cache-info.outputs.path }} | |
key: tools-go-${{ steps.setup-go.outputs.go-version }}-tools-${{ hashFiles('tools.yaml') }} | |
- name: Setup and run integration tests | |
run: | | |
# Manually create folders to ensure perms are correct. | |
mkdir -p .kube/internal | |
mkdir -p .kube/external | |
go run github.com/magefile/[email protected] -v localdev minimal-legacy | |
- name: Install Protoc | |
uses: arduino/setup-protoc@v2 | |
with: | |
version: '23.3' | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
- run: go run github.com/magefile/[email protected] -v teste2eAirflow |