checkout submodules on CI #5
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: CI | |
on: | |
push: | |
branches: | |
- "**" | |
pull_request: | |
branches: | |
- main | |
schedule: | |
- cron: "0 0 * * MON" | |
workflow_dispatch: | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Install dependencies | |
run: | | |
python3 -m pip -q install isort mypy pytest ruff yamllint | |
- name: Run ruff | |
run: | | |
python3 -m ruff . | |
- name: Run isort | |
run: | | |
python3 -m isort --check --diff . | |
- name: Run mypy | |
run: | | |
python3 -m mypy . | |
- name: Run yamllint | |
run: | | |
python3 -m yamllint -d "{ignore: turing, extends: default, rules: {document-start: {present: false}, line-length: disable, truthy: {check-keys: false}}}" . | |
test: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: docker | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Create container | |
run: bash docker_create_container.sh | |
- name: Create volume | |
run: bash docker_create_volume.sh | |
- name: Create database | |
run: bash docker_create_database.sh | |
- name: Start container | |
run: bash docker_start.sh | |
- name: Run tests | |
run: bash docker_run_tests.sh | |
- name: Run a mock terminal | |
run: bash docker_terminal.sh date | |
- name: Stop container | |
run: bash docker_stop.sh | |
- name: Destroy container | |
run: bash docker_destroy_container.sh | |
warn: | |
runs-on: ubuntu-latest | |
if: github.repository == 'dmf-unicatt/turing-docker' && github.ref == 'refs/heads/main' && github.event_name == 'schedule' | |
steps: | |
- name: Warn if scheduled workflow is about to be disabled | |
uses: fem-on-colab/warn-workflow-about-to-be-disabled-action@main | |
with: | |
workflow-filename: ci.yml | |
days-elapsed: 50 |