-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Sid Mohan
authored and
Sid Mohan
committed
Aug 18, 2024
1 parent
5ae53ee
commit ad87a19
Showing
1 changed file
with
81 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
name: beta-cicd-setup-and-test | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'v*.0.0-beta.*' | ||
pull_request: | ||
branches: | ||
- 'v*.0.0-beta.*' | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out repo | ||
uses: actions/checkout@v4 | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.10" | ||
- name: Install pre-commit | ||
run: pip install pre-commit | ||
- name: Run pre-commit | ||
run: pre-commit run --all-files | ||
|
||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: ["3.10"] | ||
steps: | ||
- name: Check out repo | ||
uses: actions/checkout@v4 | ||
- name: Free Disk Space (Ubuntu) | ||
uses: jlumbroso/free-disk-space@main | ||
with: | ||
# this might remove tools that are actually needed, | ||
# if set to "true" but frees about 6 GB | ||
tool-cache: false | ||
# all of these default to true, but feel free to set to | ||
# "false" if necessary for your workflow | ||
android: true | ||
dotnet: true | ||
haskell: true | ||
large-packages: true | ||
docker-images: true | ||
swap-storage: true | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install Tesseract OCR | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y software-properties-common | ||
sudo add-apt-repository -y ppa:alex-p/tesseract-ocr-devel | ||
sudo apt-get update | ||
sudo apt-get install -y tesseract-ocr libtesseract-dev | ||
tesseract --version | ||
dpkg -l | grep tesseract | ||
- name: Verify Tesseract Installation | ||
run: | | ||
which tesseract | ||
tesseract --list-langs | ||
- name: Install Dependencies | ||
run: | | ||
pip install -U pip | ||
pip install --no-cache-dir -e . | ||
pip install --no-cache-dir tox just pre-commit | ||
- name: Free up disk space | ||
run: | | ||
sudo apt-get clean | ||
- name: Run Tests with tox | ||
run: tox -- --cov datafog --cov-report xml --cov-report term -v -s --cov-report=term-missing | ||
- name: Submit to Codecov | ||
uses: codecov/codecov-action@v3 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
files: ./coverage.xml | ||
flags: unittests | ||
name: codecov-umbrella |