-
Notifications
You must be signed in to change notification settings - Fork 235
43 lines (36 loc) · 907 Bytes
/
test_image.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
name: Run tests on PRs and commits
on:
push:
branches:
- main
- master
pull_request:
branches:
- main
- master
workflow_dispatch:
env:
BOT_ID: 916ccfd76a7fda25c74d09e1d5
LEAGUE_ID: 164483
TEST_TAG: user/test_build:test
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Build container
uses: docker/build-push-action@v2
with:
push: false
context: .
load: true
tags: ${{ env.TEST_TAG }}
- name: Run image against tests
run: |
docker run ${{ env.TEST_TAG }} /bin/sh -c "\
python -m pip install --upgrade pip && \
pip install -r requirements.txt && \
pip install -r requirements-test.txt && \
pytest"