Skip to content

docker_test

docker_test #6

Workflow file for this run

# Copyright 2024 Agnostiq Inc.
#
# This file is part of Covalent.
#
# Licensed under the Apache License 2.0 (the "License"). A copy of the
# License may be obtained with this software package or at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Use of this file is prohibited except in compliance with the License.
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: docker_test
on:
workflow_call:
workflow_dispatch:
jobs:
build_container:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest"]
container:
- python:3.8-buster
- python:3.8-bullseye
- python:3.9-buster
- python:3.9-bullseye
- python:3.10-buster
- python:3.10-bullseye
experimental: [false]
include:
- os: macos-latest
python-version: "3.8"
experimental: false
- os: macos-latest
python-version: "3.9"
experimental: false
- os: macos-latest
python-version: "3.10"
experimental: false
container: ${{ matrix.container }}
continue-on-error: ${{ matrix.experimental }}
steps:
- name: Check out the repository
uses: actions/checkout@v4
- name: Set up Python
if: matrix.os == 'macos-latest'
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Create the ssh keypair
run: |
cd tests/docker_tests
ssh-keygen -t ed25519 -f slurm_test -N ''
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and export to Docker
uses: docker/build-push-action@v5
with:
context: ./tests/docker_tests
load: true
tags: slurm_test:latest
- name: Start the SLURM cluster container
run: |
docker run -d --name slurm-container slurm_test:latest
docker exec slurm-container chmod +r /etc/slurm/slurm.conf
- name: Run a basic covalent test
run: |
pip install -e .
cd tests/docker_tests
python basic_test.py