Skip to content

Commit

Permalink
Merge branch 'main' into des-2564
Browse files Browse the repository at this point in the history
  • Loading branch information
SilversunKSauri authored Nov 15, 2023
2 parents f3fcdab + 59120ce commit f3171bc
Show file tree
Hide file tree
Showing 270 changed files with 3,563 additions and 2,656 deletions.
3 changes: 2 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ coverage
.git
.docs
.github
.pytest_cache
.pytest_cache
data
55 changes: 25 additions & 30 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,54 +14,49 @@ jobs:
runs-on: ubuntu-22.04
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Fetch base and install Poetry
run: |
git fetch origin ${{github.base_ref}}
pipx install poetry
- name: Setup Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: 3.7

- name: Install Poetry
run: |
pip3 install poetry
python-version: '3.11'
cache: 'poetry'

- name: Copy base.html for use in unit tests
run: |
cp --force designsafe/templates/base.j2 designsafe/templates/base.html
- uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- run: |
poetry config virtualenvs.create false
poetry install
pip install -e git+https://bitbucket.org/taccaci/pytas.git@1e6e488716fd42437c568acad161ae54d0077446#egg=pytas
- name: Run Server-side linting with pytest
# Only run on new files for now-- for all changes, filter is ACMRTUXB
# Check manage.py to prevent a crash if no files are selected.
run: |
poetry run pylint $(git diff --name-only --diff-filter=A origin/${{github.base_ref}} | grep -E "(.py$)") manage.py
- name: Run Server-side formatting with black
run: |
poetry run black $(git diff --name-only --diff-filter=A origin/${{github.base_ref}} | grep -E "(.py$)") manage.py --check
- name: Run Server-side unit tests and generate coverage report
run: |
pytest --cov-config=.coveragerc --cov=designsafe --cov-report=xml -ra designsafe
poetry run pytest --cov-config=.coveragerc --cov=designsafe --cov-report=xml -ra designsafe
Client_Side_Unit_Tests:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Setup Node.js for use with actions
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: 16.x
cache: npm

- uses: actions/cache@v1
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Client Side Unit Tests
run: |
npm ci
npm run test
- run: npm ci
- run: npm run test
Loading

0 comments on commit f3171bc

Please sign in to comment.