Skip to content

Use entrypoint for dockerfile #353

Use entrypoint for dockerfile

Use entrypoint for dockerfile #353

Workflow file for this run

name: CI
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the main branch
pull_request:
types: [opened, reopened, synchronize, ready_for_review, closed]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "linting"
linting:
name: Lint code
if: github.event.pull_request.merged == false
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8]
steps:
- name: Checkout pull request branch
uses: actions/checkout@master
with:
ref: ${{ github.sha }}
- name: Select Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
uses: snok/install-poetry@v1
with:
version: 1.3.2
virtualenvs-create: true
virtualenvs-in-project: true
- name: Set up environment
shell: bash
run: |
poetry install --no-interaction --no-root --with dev
- name: Run black
run: poetry run black --check autobidsportal
- name: Run ruff
run: |
poetry run ruff autobidsportal
- name: run djLint
run: |
poetry run djlint --lint autobidsportal/templates
poetry run djlint --check autobidsportal/templates
test:
name: Set up environment and run tests
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8]
redis-version: [6]
steps:
- name: Check out PR branch
uses: actions/checkout@master
with:
ref: ${{ github.sha }}
- name: Select Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
uses: snok/install-poetry@v1
with:
version: 1.3.2
virtualenvs-create: true
virtualenvs-in-project: true
- name: Set up environment
shell: bash
run: |
poetry install --no-interaction --with dev
- name: Start Redis
uses: supercharge/[email protected]
with:
redis-version: ${{ matrix.redis-version }}
- name: Run pytest
shell: bash
run: |
poetry run pytest