-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #308 from boltlabs-inc/ci-e2e
Add new github action + workflow #288
- Loading branch information
Showing
2 changed files
with
76 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
name: E2E tests | ||
|
||
on: | ||
schedule: | ||
- cron: "0 12 * * 1" | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/cache@v2 | ||
with: | ||
path: /tmp/.buildx-cache | ||
key: ${{ runner.os }}-buildx-docker-${{ github.sha }} | ||
restore-keys: | | ||
${{ runner.os }}-buildx-docker-${{ github.sha }} | ||
${{ runner.os }}-buildx-docker- | ||
${{ runner.os }}- | ||
- uses: actions/checkout@v2 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Prepare Tags | ||
id: tags | ||
run: | | ||
TAG=$(echo $GITHUB_SHA | head -c7) | ||
IMAGE="dev/test" | ||
echo ::set-output name=tagged_image::${IMAGE}:${TAG} | ||
echo ::set-output name=tag::${TAG} | ||
- uses: docker/setup-buildx-action@v1 | ||
id: buildx | ||
|
||
- name: Build | ||
id: docker_build | ||
uses: docker/build-push-action@v2 | ||
with: | ||
file: ./Dockerfile | ||
builder: ${{ steps.buildx.outputs.name }} | ||
push: false | ||
load: true | ||
cache-from: type=local,src=/tmp/.buildx-cache | ||
cache-to: type=local,dest=/tmp/.buildx-cache-new | ||
tags: ${{ steps.tags.outputs.tagged_image }} | ||
|
||
- name: Run sandbox | ||
run: docker run --rm --name my-sandbox --detach -p 20000:20000 tqtezos/flextesa:20210602 flobox start | ||
|
||
- uses: addnab/docker-run-action@v3 | ||
with: | ||
image: ${{ steps.tags.outputs.tagged_image }} | ||
docker_network: host | ||
run: | | ||
tezos-client config reset | ||
tezos-client --endpoint http://my-sandbox:20000 bootstrapped | ||
tezos-client --endpoint http://my-sandbox:20000 config update | ||
tezos-client import secret key alice unencrypted:edsk3QoqBuvdamxouPhin7swCvkQNgq4jP5KZPbwWNnwdZpSpJiEbq | ||
tezos-client import secret key bob unencrypted:edsk3RFfvaFaxbHx8BMtEW1rKQcPtDML3LXjNqMNLCzC3wLC1bWbAt | ||
cd dev | ||
nohup python3 test-zeekoe.py merch-setup --url "http://my-sandbox:20000" -v & | ||
nohup python3 test-zeekoe.py cust-setup --url "http://my-sandbox:20000" -v & | ||
python3 test-zeekoe.py test-all | ||
- name: Move cache | ||
run: | | ||
rm -rf /tmp/.buildx-cache | ||
mv /tmp/.buildx-cache-new /tmp/.buildx-cache |
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