Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setup continuous integration #48

Merged
merged 5 commits into from
Dec 30, 2021
Merged

Conversation

robinmatz
Copy link
Collaborator

@robinmatz robinmatz commented Dec 11, 2021

Hi,

this PR is totally optional. I just thought it might be nice to have a continuous integration set up for this repository.

run-tests.yml runs the test cases against python3.7 and python3.9 with robotframework versions 3.2, 4.0 and 4.1.
It only runs it against x3270 for now, but in theory we could define a suite where argument visible is False and we can test against s3270 as well.

With windows, I am not sure though.

I have noticed two things however.

  1. Sometimes, the ci fails with the error not connected, see file attached. In this case, rerunning it a bit later solved the issue.
  2. As you can see below, I wrapped two test cases with Run Keyword And Continue On Error. This is because for some reason, the test cases with utf-8 characters fail on linux: _ëçá != _ëç?. We should open an issue and investigate the error there.

Tests results python3.7 rf4.1.zip

To get a feel for how it looks like, checkout https://github.com/robinmatz/Robot-Framework-Mainframe-3270-Library/actions/runs/1567060531

@samuelpcabral
Copy link
Member

Yes, I know this issue with utf-8 in linux, but right now I don´t have a linux machine and time to fix this.

@samuelpcabral
Copy link
Member

I'm not sure if it's worth testing against different versions of Robot Framework. Theoretically it is backward compatible and I intend to always be using the latest version.

Testing against different versions of Python I completely agree.

@robinmatz
Copy link
Collaborator Author

Hey,
so I changed the .yml to only test against different versions of python.
I tried to solve the problem with the encoding. I could fix it for running tests in Docker with the following Dockerfile build from the project root directory:

FROM python:3.8

RUN apt-get update && apt-get install -y \
	x3270 s3270 xvfb locales && \
	locale-gen en_US.UTF-8 && \
	python3 -m pip install -U pip wheel setuptools && \
	python3 -m pip install robotframework robotframework-pythonlibcore six

ENV LANG=en_US.UTF-8 \
	LANGUAGE=en_US:en \
	LC_ALL=en_US.UTF-8

WORKDIR /opt/rf

COPY Mainframe3270 Mainframe3270
COPY tests tests

However, I was not able to achieve the same results in GitHub Actions.

@robinmatz
Copy link
Collaborator Author

Thanks to this solution, test cases with utf-8 characters can now also be executed in the pipeline.

@samuelpcabral samuelpcabral merged commit 817992a into MarketSquare:master Dec 30, 2021
@robinmatz robinmatz deleted the ci branch January 22, 2022 08:10
@github-actions github-actions bot mentioned this pull request Mar 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants