Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
F
funkwhale
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Container Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Luclu7
funkwhale
Commits
072605de
Commit
072605de
authored
Jun 25, 2017
by
Eliot Berriot
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CI builds / pipeline now run tests and build static assets
parent
76f98b74
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
60 additions
and
39 deletions
+60
-39
.gitlab-ci.yml
.gitlab-ci.yml
+39
-1
api/config/settings/test.py
api/config/settings/test.py
+1
-0
api/docker/Dockerfile.base
api/docker/Dockerfile.base
+0
-10
api/docker/Dockerfile.local
api/docker/Dockerfile.local
+0
-12
api/docker/Dockerfile.test
api/docker/Dockerfile.test
+8
-2
api/funkwhale_api/radios/radios.py
api/funkwhale_api/radios/radios.py
+1
-1
api/funkwhale_api/radios/tests/test_radios.py
api/funkwhale_api/radios/tests/test_radios.py
+1
-2
api/requirements/test.txt
api/requirements/test.txt
+1
-1
api/test.yml
api/test.yml
+0
-1
dev.yml
dev.yml
+9
-9
No files found.
.gitlab-ci.yml
View file @
072605de
image
:
docker:latest
stages
:
-
test
-
build
test_api
:
stage
:
test
before_script
:
-
docker-compose -f api/test.yml build
script
:
-
docker-compose -f api/test.yml run test
after_script
:
-
docker-compose -f api/test.yml run test rm -rf funkwhale_api/media/
tags
:
-
dind
build_front
:
stage
:
build
image
:
node:6-alpine
before_script
:
-
cd front
script
:
-
npm install
-
npm run build
cache
:
key
:
"
$CI_COMMIT_REF_NAME"
paths
:
-
front/node_modules
artifacts
:
name
:
"
front_${CI_COMMIT_REF_NAME}"
paths
:
-
front/dist/
only
:
-
master
-
develop
tags
:
-
docker
# When using dind, it's wise to use the overlayfs driver for
# improved performance.
...
...
api/config/settings/test.py
View file @
072605de
...
...
@@ -32,3 +32,4 @@ CELERY_ALWAYS_EAGER = True
########## END CELERY
# Your local stuff: Below this line define 3rd party library settings
API_AUTHENTICATION_REQUIRED
=
False
api/docker/Dockerfile.base
deleted
100644 → 0
View file @
76f98b74
FROM python:3.5
ENV PYTHONUNBUFFERED 1
# Requirements have to be pulled and installed here, otherwise caching won't work
COPY ./requirements.apt /requirements.apt
COPY ./install_os_dependencies.sh /install_os_dependencies.sh
RUN bash install_os_dependencies.sh install
COPY ./requirements /requirements
RUN pip install -r /requirements/base.txt
api/docker/Dockerfile.local
deleted
100644 → 0
View file @
76f98b74
FROM python:3.5
ENV PYTHONUNBUFFERED 1
# Requirements have to be pulled and installed here, otherwise caching won't work
COPY ./requirements.apt /requirements.apt
COPY ./install_os_dependencies.sh /install_os_dependencies.sh
RUN bash install_os_dependencies.sh install
COPY ./requirements /requirements
RUN pip install -r /requirements/local.txt
WORKDIR /app
api/docker/Dockerfile.test
View file @
072605de
FROM
funkwhale
/
apibase
FROM
python
:
3.5
ENV
PYTHONUNBUFFERED
1
ENV
PYTHONDONTWRITEBYTECODE
1
# Requirements have to be pulled and installed here, otherwise caching won't work
COPY
./
requirements
.
apt
/
requirements
.
apt
COPY
./
install_os_dependencies
.
sh
/
install_os_dependencies
.
sh
RUN
bash
install_os_dependencies
.
sh
install
COPY
./
requirements
/
requirements
RUN
mkdir
/
requirements
COPY
./
requirements
/
base
.
txt
/
requirements
RUN
pip
install
-
r
/
requirements
/
base
.
txt
COPY
./
requirements
/
local
.
txt
/
requirements
RUN
pip
install
-
r
/
requirements
/
local
.
txt
COPY
./
requirements
/
test
.
txt
/
requirements
RUN
pip
install
-
r
/
requirements
/
test
.
txt
WORKDIR
/
app
api/funkwhale_api/radios/radios.py
View file @
072605de
...
...
@@ -50,7 +50,7 @@ class SessionRadio(SimpleRadio):
def
filter_from_session
(
self
,
queryset
):
already_played
=
self
.
session
.
session_tracks
.
all
()
.
values_list
(
'track'
,
flat
=
True
)
queryset
=
queryset
.
exclude
(
pk__in
=
already_played
)
queryset
=
queryset
.
exclude
(
pk__in
=
list
(
already_played
)
)
return
queryset
def
pick
(
self
,
**
kwargs
):
...
...
api/funkwhale_api/radios/tests/test_radios.py
View file @
072605de
...
...
@@ -74,12 +74,11 @@ class TestRadios(TestCase):
def
test_can_use_radio_session_to_filter_choices
(
self
):
tracks
=
mommy
.
make
(
'music.Track'
,
_quantity
=
30
)
radio
=
radios
.
RandomRadio
()
session
=
radio
.
start_session
(
self
.
user
)
for
i
in
range
(
30
):
radio
.
pick
()
p
=
radio
.
pick
()
# ensure 30 differents tracks have been suggested
tracks_id
=
[
session_track
.
track
.
pk
for
session_track
in
session
.
session_tracks
.
all
()]
...
...
api/requirements/test.txt
View file @
072605de
...
...
@@ -7,6 +7,6 @@ coverage==4.0.3
django_coverage_plugin==1.1
flake8==2.5.0
django-test-plus==1.0.11
factory_boy
==2.6.0
factory_boy
>=2.8.1
model_mommy
tox
api/test.yml
View file @
072605de
...
...
@@ -6,4 +6,3 @@ test:
-
.:/app
environment
:
-
DJANGO_SETTINGS_MODULE=config.settings.test
-
API_AUTHENTICATION_REQUIRED=False
dev.yml
View file @
072605de
...
...
@@ -52,12 +52,12 @@ services:
-
redis
-
celeryworker
nginx
:
env_file
:
.env.dev
build
:
./api/compose/nginx
links
:
-
api
volumes
:
-
./api/funkwhale_api/media:/staticfiles/media
ports
:
-
"
0.0.0.0:6001:80"
#
nginx:
#
env_file: .env.dev
#
build: ./api/compose/nginx
#
links:
#
- api
#
volumes:
#
- ./api/funkwhale_api/media:/staticfiles/media
#
ports:
#
- "0.0.0.0:6001:80"
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment