Add validation task for supported filetype IDs #19
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
--- | |
name: Validate local database | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
submodules: true | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
cache: pip | |
cache-dependency-path: pyproject.toml | |
- name: Install dependencies | |
run: pip install . | |
- name: Lint repository | |
run: pre-commit run --all-files | |
- name: Check for bad file extensions | |
run: invoke check-for-yaml | |
validate: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
submodules: true | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
cache: pip | |
cache-dependency-path: pyproject.toml | |
- name: Install dependencies | |
run: pip install . | |
- name: Run database ingestion tasks | |
run: | | |
invoke validate-entries | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check Docker build | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
submodules: true | |
- name: Build image | |
run: | | |
docker build . -t datatractor-yard | |
- name: Launch image | |
run: | | |
docker run -d --env PORT=8080 -p 8080:8080 datatractor-yard | |
- name: Hit registry endpoints | |
run: | | |
sleep 5 | |
curl http://localhost:8080/api/filetypes | jq | |
curl http://localhost:8080/api/extractors | jq | |
curl http://localhost:8080/api/redoc | |
curl http://localhost:8080/filetypes | |
curl http://localhost:8080/extractors |