Fix nightly builds (#1101)

* Restore files used in nightly
* fix helm test to use renamed argo
* point test to correct python location
* use python 3.9 for :=
This commit is contained in:
LisannaAtGalois 2021-03-10 08:04:31 -08:00 committed by GitHub
parent 9943b5ce0c
commit 8a0a0094ae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 31 additions and 6 deletions

View File

@ -75,20 +75,20 @@ jobs:
- name: Build test-cryptol-remote-api
uses: docker/build-push-action@v1
with:
tags: test
repository: galoisinc/cryptol-remote-api
tags: latest
repository: galoisinc/test-cryptol-remote-api
push: false
dockerfile: cryptol-remote-api/test/Dockerfile
dockerfile: cryptol-remote-api/test.Dockerfile
- name: Test cryptol-remote-api helm chart
run: |
set -x
kind create cluster --wait 10m
kind load docker-image galoisinc/cryptol-remote-api:nightly
kind load docker-image galoisinc/cryptol-remote-api:test
kind load docker-image galoisinc/test-cryptol-remote-api:latest
helm install --wait cra-http ./helm/cryptol-remote-api --set server.connType=http --set image.tag=nightly
helm install --wait cra-socket ./helm/cryptol-remote-api --set server.connType=socket --set image.tag=nightly
kubectl run --rm --attach test-http --image=galoisinc/cryptol-remote-api:test --image-pull-policy=Never --restart=Never -- http cra-http-cryptol-remote-api 8080
kubectl run --rm --attach test-socket --image=galoisinc/cryptol-remote-api:test --image-pull-policy=Never --restart=Never -- socket cra-socket-cryptol-remote-api 8080
kubectl run --rm --attach test-http --image=galoisinc/test-cryptol-remote-api --image-pull-policy=Never --restart=Never -- http cra-http-cryptol-remote-api 8080
kubectl run --rm --attach test-socket --image=galoisinc/test-cryptol-remote-api --image-pull-policy=Never --restart=Never -- socket cra-socket-cryptol-remote-api 8080
docker-cryptol-remote-api-portable:
runs-on: ubuntu-latest

View File

@ -0,0 +1,17 @@
import sys
import argo_client.connection as argo
import cryptol
connType = sys.argv[1]
host = sys.argv[2]
port = int(sys.argv[3])
if connType == 'socket':
c = cryptol.connect(argo.RemoteSocketProcess(host, port=port, ipv6=False))
elif connType == 'http':
c = cryptol.CryptolConnection(argo.ServerConnection(argo.HttpProcess(url="http://%s:%d/" % (host,port))))
else:
raise Exception('specify socket or http for connection type')
c.load_module('Cryptol')
assert c.evaluate_expression("1+1").result()['value'] == 2

View File

@ -0,0 +1,8 @@
FROM python:3.9
# Intended to be built from the root of the cryptol git repository
COPY cryptol-remote-api/python python
RUN pip3 install -r python/requirements.txt
RUN pip3 install -e python
COPY cryptol-remote-api/test-cryptol-remote-api.py /entrypoint.py
ENTRYPOINT ["python3", "/entrypoint.py"]