app start script update #62
This file contains hidden or 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 Pipeline | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out the repository | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.9' | |
- name: Install required tools | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y g++ openjdk-11-jdk | |
- name: Install Python dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r time_complexity_analyzer/requirements.txt | |
- name: Run pytest for analyzer tests | |
run: pytest time_complexity_analyzer/analyzer -v | |
- name: Run Django tests | |
run: | | |
python time_complexity_analyzer/manage.py migrate | |
python time_complexity_analyzer/manage.py test | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '16' | |
- name: Install frontend dependencies | |
working-directory: time_complexity_analyzer/frontend | |
run: npm install --legacy-peer-deps | |
- name: Run React frontend tests | |
working-directory: time_complexity_analyzer/frontend | |
run: npm test -- --watchAll=false |