Skip to content

test

test #42

Workflow file for this run

name: Docker Image CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
submodules: true
token: ${{ secrets.CI_TOKEN }}
- name: Install python dependencies
run: |
pip install -r requirements.txt
- name: Install chrome and chromedriver for robot
run: |
google-chrome --version
wget https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/118.0.5993.70/linux64/chrome-linux64.zip
wget https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/118.0.5993.70/linux64/chromedriver-linux64.zip
unzip chrome-linux64.zip
unzip chromedriver-linux64.zip
sudo ln -fs $PWD/chrome-linux64/chrome /usr/bin/google-chrome
- name: Build the website
run: |
python HomePage.py start --ssl_mode http &
- name: wget the built website
run: |
sleep 4
wget --mirror --page-requisites --convert-links \
--no-parent -P downloaded-site http://localhost:8080/
- name: List output
run: |
# List the downloaded files
ls -l
- name: robot test
run: |
cd tests
export PATH=$PWD/chrome-linux64:$PWD/chromedriver-linux64:$PATH
echo $PATH
robot home-http.py
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
submodules: true
token: ${{ secrets.CI_TOKEN }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push Docker image
uses: docker/build-push-action@v2
with:
context: . # Path to the Dockerfile
push: true
platforms: linux/arm/v6,linux/arm/v8,linux/arm64,linux/amd64
tags: |
zostaw/multiarch-home-page:latest
zostaw/multiarch-home-page:${{ github.sha }}