Merge pull request #228 from wtsi-npg/devel #800
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: Test | |
on: | |
push: | |
branches: [master, devel] | |
pull_request: | |
branches: [master, devel] | |
jobs: | |
test-packaging: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.10' | |
architecture: 'x64' | |
- name: "Run pip install" | |
run: | | |
pip install . | |
test: | |
runs-on: ubuntu-latest | |
services: | |
mysql-mlwh: | |
image: mysql:8.0 | |
ports: | |
- 3306:3306 | |
options: >- | |
--health-cmd "mysqladmin ping" | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 10 | |
env: | |
MYSQL_RANDOM_ROOT_PASSWORD: yes | |
MYSQL_TCP_PORT: 3306 | |
MYSQL_USER: "test" | |
MYSQL_PASSWORD: "test" | |
MYSQL_DATABASE: "mlwarehouse" | |
mysql-qcdb: | |
image: mysql:8.0 | |
ports: | |
- 3307:3307 | |
options: >- | |
--health-cmd "mysqladmin ping" | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 10 | |
env: | |
MYSQL_RANDOM_ROOT_PASSWORD: yes | |
MYSQL_TCP_PORT: 3307 | |
MYSQL_USER: "test" | |
MYSQL_PASSWORD: "test" | |
MYSQL_DATABASE: "langqc" | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Poetry | |
run: | | |
pipx install poetry | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.10' | |
architecture: 'x64' | |
- name: Run poetry install | |
run: | | |
poetry env use '3.10' | |
poetry install | |
- name: Run pytest | |
run: | | |
poetry run pytest | |
test-frontend: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: '20' | |
- run: npm install | |
working-directory: ./frontend | |
- run: npm run test | |
working-directory: ./frontend |