mirror of
https://github.com/RoboSats/robosats.git
synced 2025-01-18 12:11:35 +00:00
Add npm test github actions workflow
This commit is contained in:
parent
03e4bbc1a5
commit
a7cb34e55f
@ -1,6 +1,7 @@
|
||||
name: Django Tests
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches: [ "main" ]
|
||||
paths: ["api", "chat", "control", "robosats"]
|
||||
@ -23,7 +24,8 @@ jobs:
|
||||
python-version: ["3.10.2"]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: 'Checkout'
|
||||
uses: actions/checkout@v3
|
||||
- name: 'Set up Python ${{ matrix.python-version }}'
|
||||
uses: actions/setup-python@v3
|
||||
with:
|
42
.github/workflows/frontend-tests.yml
vendored
Normal file
42
.github/workflows/frontend-tests.yml
vendored
Normal file
@ -0,0 +1,42 @@
|
||||
name: Frontend Tests
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches: [ "main" ]
|
||||
paths: [ "frontend" ]
|
||||
pull_request:
|
||||
branches: [ "main" ]
|
||||
paths: [ "frontend" ]
|
||||
|
||||
concurrency:
|
||||
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: read
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
DEVELOPMENT: 1
|
||||
|
||||
steps:
|
||||
- name: 'Checkout'
|
||||
uses: actions/checkout@v3
|
||||
- name: 'Setup node'
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 16.16.0
|
||||
cache: npm
|
||||
cache-dependency-path: frontend/package-lock.json
|
||||
- name: 'Install NPM Dependencies'
|
||||
run: |
|
||||
cd frontend
|
||||
npm install
|
||||
- name: 'Tests'
|
||||
run: |
|
||||
cd frontend
|
||||
npm test
|
@ -708,7 +708,7 @@ class UserView(APIView):
|
||||
image_path = avatar_path.joinpath(nickname + ".png")
|
||||
if not image_path.exists():
|
||||
with open(image_path, "wb") as f:
|
||||
rh.img.save(f, format="png")
|
||||
rh.img.save(f, format="png", optimize=True)
|
||||
|
||||
# Create new credentials and login if nickname is new
|
||||
if len(User.objects.filter(username=nickname)) == 0:
|
||||
|
Loading…
Reference in New Issue
Block a user