Map nested improvements (#613) #145
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: Lithops images | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
test: | |
name: ${{ matrix.lithops-backend }} ${{ matrix.os }} py${{ matrix.python_version }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- os: ubuntu-latest | |
python-version: "3.11" | |
requirements-file: ci/requirements-lithops-aws.txt | |
lithops-config: .github/workflows/.lithops_config_aws | |
lithops-backend: aws_lambda | |
lithops-build-file: ci/docker/Dockerfile_aws_lambda_main | |
lithops-memory: 2000 | |
- os: ubuntu-latest | |
python-version: "3.11" | |
requirements-file: ci/requirements-lithops-gcp.txt | |
lithops-config: .github/workflows/.lithops_config_gcp | |
lithops-backend: gcp_functions | |
lithops-build-file: ci/requirements-lithops-gcp.txt | |
lithops-memory: 2048 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Copy lithops configuration templates | |
run: | | |
cp $GITHUB_WORKSPACE/.github/workflows/.lithops_config_aws.template $GITHUB_WORKSPACE/.github/workflows/.lithops_config_aws | |
cp $GITHUB_WORKSPACE/.github/workflows/.lithops_config_gcp.template $GITHUB_WORKSPACE/.github/workflows/.lithops_config_gcp | |
- name: Google auth | |
id: 'auth' | |
uses: 'google-github-actions/auth@v2' | |
with: | |
credentials_json: '${{ secrets.GOOGLE_CREDENTIALS }}' | |
create_credentials_file: true | |
- name: Configure lithops AWS | |
uses: microsoft/variable-substitution@v1 | |
with: | |
files: ${{ github.workspace }}/.github/workflows/.lithops_config_aws | |
env: | |
aws.access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
aws.secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
- name: Configure lithops GCP | |
uses: microsoft/variable-substitution@v1 | |
with: | |
files: ${{ github.workspace }}/.github/workflows/.lithops_config_gcp | |
env: | |
gcp.credentials_path: ${{ steps.auth.outputs.credentials_file_path }} | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v3 | |
with: | |
python-version: ${{ matrix.python-version }} | |
architecture: x64 | |
- name: Install | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install -r ${{ matrix.requirements-file }} | |
- name: Build and deploy images | |
env: | |
LITHOPS_CONFIG_FILE: ${{ github.workspace }}/${{ matrix.lithops-config }} | |
run: | | |
lithops runtime delete -b ${{ matrix.lithops-backend }} -d cubed-runtime-main | |
lithops runtime build -b ${{ matrix.lithops-backend }} -f ${{ matrix.lithops-build-file }} cubed-runtime-main | |
lithops runtime deploy -b ${{ matrix.lithops-backend }} --memory ${{ matrix.lithops-memory }} cubed-runtime-main |