-
-
Notifications
You must be signed in to change notification settings - Fork 211
53 lines (42 loc) · 1.49 KB
/
unit-tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: ListenBrainz Server Tests
on:
push:
branches: [ master ]
pull_request:
branches: [ '*' ]
types: [ opened, synchronize, reopened, ready_for_review ]
paths-ignore:
- 'listenbrainz_spark/**'
- 'requirements_spark.txt'
- '**/Dockerfile.spark*'
- '**.jsx?'
- '**.tsx?'
- '**.snap'
- 'docker/docker-compose.spark*.yml'
- 'docker/prod/**'
- 'docker/services/**'
- 'docker/spark-cluster-config/**'
- 'docs/**'
- '**.less'
- '**.md'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
runs-on: ubuntu-latest
if: github.event.pull_request.draft == false
steps:
- uses: actions/checkout@v4
- name: Create configuration file
run: cp listenbrainz/config.py.sample listenbrainz/config.py
- name: Login to Docker Hub
run: echo ${{ secrets.DOCKER_HUB_PASSWORD }} | docker login -u ${{ secrets.DOCKER_HUB_USERNAME }} --password-stdin
continue-on-error: true
# by default, docker-compose tries to pull the `listenbrainz` image used by timescale_writer as well.
# but this is built locally for the listenbrainz service and reused for timescale writer, hence the pull fails.
# to avoid this we specifically mention the services to pull images for here,
- name: Pull docker images
run: docker-compose -f docker/docker-compose.test.yml pull lb_db redis rabbitmq couchdb
- name: Run tests
run: ./test.sh