edouard@3836: name: CI Automated testing edouard@3456: edouard@3456: on: edouard@3456: push: edouard@3827: branches: [ python3 ] edouard@3456: edouard@3456: jobs: edouard@3456: edouard@3456: build: edouard@3456: edouard@3700: runs-on: ubuntu-latest edouard@3456: edouard@3456: steps: edouard@3456: - uses: actions/checkout@v3 edouard@3459: with: edouard@3459: path: beremiz edouard@3459: edouard@3459: - uses: actions/checkout@v3 edouard@3459: with: edouard@3459: repository: beremiz/matiec edouard@4055: ref: bc38335298d4faa949ddbefedaa55cccfcf94eda edouard@3459: path: matiec edouard@3459: edouard@3549: - uses: actions/checkout@v3 edouard@3549: with: edouard@3549: repository: open62541/open62541 edouard@3958: # v1.3.7 edouard@3958: ref: b8ac9e77f703e6ba5c012b886a8821037503daa6 edouard@3549: path: open62541 edouard@3560: submodules: recursive edouard@3549: edouard@3927: - uses: actions/checkout@v3 edouard@3927: with: edouard@3927: repository: beremiz/Modbus edouard@3927: ref: 4d7d67a8e911d744165709c20a254b5cb924ec71 edouard@3927: path: Modbus edouard@3927: edouard@3958: - uses: actions/checkout@v3 edouard@3958: with: edouard@4044: repository: beremiz/erpc edouard@4044: # v1.13.0 + no CRC on TCP edouard@4044: ref: d8fff72b15274b5f2a8f7895d9bc5c91eef584ec edouard@3958: path: erpc edouard@3958: edouard@3828: - name: Restore cached docker image edouard@3828: id: cache-docker-restore edouard@3828: uses: actions/cache/restore@v3 edouard@3459: env: edouard@3459: cache-name: cache-docker edouard@3459: with: edouard@3459: path: /tmp/latest.tar edouard@3841: key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('beremiz/tests/tools/Docker', 'beremiz/requirements.txt') }} edouard@3459: edouard@3828: - if: ${{ steps.cache-docker-restore.outputs.cache-hit == false }} edouard@3459: name: Create docker image edouard@3456: run: | edouard@3693: cd beremiz/tests/tools/Docker edouard@3456: ./build_docker_image.sh edouard@3460: docker image save --output="/tmp/latest.tar" beremiz_sikuli edouard@3459: edouard@3831: - if: ${{ steps.cache-docker-restore.outputs.cache-hit == false }} edouard@3831: name: Save docker image in cache edouard@3828: id: cache-docker-save edouard@3828: uses: actions/cache/save@v3 edouard@3828: with: edouard@3828: path: /tmp/latest.tar edouard@3828: key: ${{ steps.cache-docker-restore.outputs.cache-primary-key }} edouard@3828: edouard@3828: - if: ${{ steps.cache-docker-restore.outputs.cache-hit != false }} edouard@3459: name: Re-use docker image edouard@3459: run: | edouard@3460: docker image load --input="/tmp/latest.tar" edouard@3459: edouard@3456: - name: Create docker container edouard@3456: run: | edouard@3693: cd beremiz/tests/tools/Docker edouard@3461: ./create_docker_container.sh ${{ github.workspace }}/test edouard@3456: edouard@3463: - name: Run tests in docker edouard@3463: run: | edouard@3693: cd beremiz/tests/tools/Docker edouard@3530: ./do_test_in_docker.sh edouard@3459: edouard@3459: - name: Upload test resuts artifact edouard@3459: uses: actions/upload-artifact@v3 edouard@3533: if: failure() edouard@3459: with: edouard@3459: name: test_results edouard@3465: path: ${{ github.workspace }}/test edouard@3459: retention-days: 5