Skip to content

Merge pull request #8 from Knox-AAU/split-workflow-pullrequest_push #2

Merge pull request #8 from Knox-AAU/split-workflow-pullrequest_push

Merge pull request #8 from Knox-AAU/split-workflow-pullrequest_push #2

Workflow file for this run

name: test-and-build
on:
push:
branches: ["**"]
env:
# Use docker.io for Docker Hub if empty
REGISTRY: ghcr.io
# github.repository as <account>/<repo>
IMAGE_NAME: ${{ github.repository }}
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Setup python
uses: actions/setup-python@v3
with:
python-version: 3.12.0
- name: Install dependencies
run: |
echo "Installing dependencies"
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run tests
run: |
echo "Testing..."
python -m unittest || exit 1
#Run all test
build:
needs: test
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Setup python
uses: actions/setup-python@v3
with:
python-version: 3.12.0
- name: Install dependencies
run: |
echo "Installing dependencies"
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Build both projects if test pass
run: |
echo "Building projects"
python3 relation_extraction/main.py
python3 concept_linking/main.py