Skip to content

Fix unnecessary space before comma on the program page #631

Fix unnecessary space before comma on the program page

Fix unnecessary space before comma on the program page #631

name: Test than deploy
on:
push:
branches: [master]
pull_request:
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10"]
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Install JS/CSS dependencies
run: npm ci
- name: Build JS/CSS with webpack
run: npm run build
- name: Lint with flake8
run: |
pip install flake8
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Django check
run: ./manage.py check
- name: Django migrations
run: ./manage.py makemigrations --check --dry-run
- name: Django test
run: coverage run ./manage.py test -v 2
- name: Generate coverage report
run: coverage xml
- name: Upload coverage to codecov.io
uses: codecov/codecov-action@v1
with:
file: ./coverage.xml
fail_ci_if_error: true
verbose: true
if: matrix.python-version == 3.10
deploy:
if: github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
needs: test
environment:
name: production
url: https://warsztatywww.pl
steps:
# Fetching the repository is required for Sentry to determine commits for this deploy
- uses: actions/checkout@v2
- uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: Run a multi-line script
run: |
echo warsztatywww.pl ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBNWqatTc0A9bJT+WmSHOuSpm+a83QcSScetN5KClPbOjtEum1IeA6sU+QXHbTh2TLXYPr2H+/5IoXgFIyPt4NAc= >~/.ssh/known_hosts
ssh [email protected] "$GITHUB_SHA"
- name: Create Sentry release
uses: getsentry/action-release@v1
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_ORG: warsztatywww
SENTRY_PROJECT: aplikacjawww
with:
environment: production