updates made for lab to run without 'CSRF errors' #293
Workflow file for this run
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: 'Lint Code' | |
on: | |
push: | |
branches: [master, main] | |
pull_request: | |
branches: [master, main] | |
jobs: # list of things to do | |
lint_function_js: | |
name: Linting JavaScript Function | |
runs-on: ubuntu-latest | |
steps: # list of steps | |
- name: Install NodeJS | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
- name: Code Checkout | |
uses: actions/checkout@v3 | |
- name: Install Dependencies | |
run: npm install | |
working-directory: functions/sample/nodejs | |
- name: Code Linting | |
run: npm run lint | |
working-directory: functions/sample/nodejs | |
lint_function_python: | |
name: Linting Python Function | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python 3.7 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.7 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install pylint | |
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
- name: Lint with Pylint | |
run: pylint *.py | |
working-directory: functions/sample/python | |
lint_django_server: | |
name: Linting Django Server | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python 3.7 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.7 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install pylint | |
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
- name: Lint with Pylint | |
run: pylint *.py | |
working-directory: server |