From 2f7c0f85f3942319dffd0c35749acb2b53bb1019 Mon Sep 17 00:00:00 2001 From: navchandar <12165092+navchandar@users.noreply.github.com> Date: Mon, 17 Jul 2023 10:30:06 +0530 Subject: [PATCH] Adding github actions --- .github/workflows/main.yml | 35 +++++++++++++++++++++++++++++++++++ .travis.yml | 38 -------------------------------------- requirements.txt | 2 +- 3 files changed, 36 insertions(+), 39 deletions(-) create mode 100644 .github/workflows/main.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..8c974bc --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,35 @@ +name: Python package + +on: [push] + +jobs: + build: + + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.9", "3.10", "3.11"] + + steps: + - uses: actions/checkout@v3 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + + - name: Display Python version + run: python -c "import sys; print(sys.version)" + + - name: Setup Chrome + uses: browser-actions/setup-chrome@v1.2.0 + run: chrome --version + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + + - name: Test + run: | + python -m unittest test || python3 -m unittest test.py \ No newline at end of file diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 2461542..0000000 --- a/.travis.yml +++ /dev/null @@ -1,38 +0,0 @@ -language: python - -cache: pip - -jobs: - include: - - name: "Python 3.8.0 on Xenial Linux" - python: 3.8 # this works for Linux but is ignored on macOS or Windows - addons: - apt: - packages: - - chromium-browser - - chromium-chromedriver - before_install: - - python3 -m pip install --upgrade pip - - - name: "Python 3.8.0 on Windows" - os: windows # Windows 10.0.17134 N/A Build 17134 - language: shell # 'language: python' is an error on Travis CI Windows - before_install: - - choco install python --version 3.8.0 - - choco install googlechrome - - choco install chromedriver - - python -m pip install --upgrade pip - env: PATH=/c/Python38:/c/Python38/Scripts:$PATH - addons: - chrome: stable - -branches: - only: - - master - -install: - - pip3 install -r requirements.txt # install dependencies - -# command to run tests -script: - - python -m unittest test || python3 -m unittest test.py diff --git a/requirements.txt b/requirements.txt index 9839222..734acc3 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ reportlab==4.0.4 webdriver_manager==3.8.6 selenium==3.141.0 -PyPDF2==3.0.1 +pypdf>=3.9.0 \ No newline at end of file