Skip to content

Commit

Permalink
completed test-build pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
zostaw committed Oct 24, 2023
1 parent 0030a66 commit c8d8715
Showing 1 changed file with 9 additions and 23 deletions.
32 changes: 9 additions & 23 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
branches: [ "actions-tests2" ]

jobs:
build-and-test:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
Expand All @@ -16,43 +16,30 @@ jobs:
submodules: true
token: ${{ secrets.CI_TOKEN }}

- name: Install python dependencies
run: |
pip install -r requirements.txt
- name: Create certificates
run: |
openssl req -x509 -newkey rsa:4096 -nodes -out app/cert.pem -keyout app/key.pem -days 1 -subj "/C=PL/ST=State/L=/O=/OU=/CN=localhost"
- name: Build and Run Docker image
- name: Build and run test web
run: |
IMAGE_NAME="zostaw/multiarch-home-page"
IMAGE_TAG="latest"
docker build -t $IMAGE_NAME:$IMAGE_TAG .
docker compose up -d
- name: Create Docker Network
run: docker network create my-network

- name: attach to network
run: docker network connect my-network home-page-home-page-1
- name: Create docker network
run: |
docker network create my-network
docker network connect my-network home-page-home-page-1
- name: Verify in next job
- name: Verify container
run: |
sleep 3
docker ps
- name: Wget localhost
run: |
wget --no-check-certificate --mirror --page-requisites --convert-links \
--no-parent -P downloaded-site https://localhost:8080
- name: List WORKSPACE
run: sudo mkdir -m 777 $PWD/reports

- name: Execute tests
run: |
sudo mkdir -m 777 $PWD/reports
docker run --network=my-network --shm-size=1g -e BROWSER=chrome -v ${PWD}/robot_tests:/opt/robotframework/tests:Z -v $PWD/reports:/opt/robotframework/reports:Z ppodgorsek/robot-framework:latest
- name: Upload test results
Expand All @@ -62,9 +49,8 @@ jobs:
name: reports
path: reports


build:
needs: build-and-test
needs: test
runs-on: ubuntu-latest
steps:
- name: Checkout code
Expand Down

0 comments on commit c8d8715

Please sign in to comment.