-
Notifications
You must be signed in to change notification settings - Fork 10
70 lines (58 loc) · 1.74 KB
/
build-and-run-pytest.yaml
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
name: Build image and run pytest
on:
push:
branches:
- test/self-hosted-runner
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build image
run: docker build -t claasp ./docker/
test:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v2
- name: Run tests
run: docker run -it claasp make remote-pytest /home/sage/tii-claasp
# jobs:
# build-and-run-pytest:
# runs-on: ubuntu-latest
# steps:
# - name: Checkout
# uses: actions/checkout@v4
# with:
# persist-credentials: false
# fetch-depth: 0
# - name: Set up QEMU
# uses: docker/setup-qemu-action@v3
# - name: Set up Docker Buildx
# uses: docker/setup-buildx-action@v3
# - name: Cache Docker layers
# uses: actions/cache@v3
# with:
# path: /tmp/.buildx-cache
# key: ${{ runner.os }}-buildx-${{ github.sha }}
# restore-keys: |
# ${{ runner.os }}-buildx-
# - name: Build
# uses: docker/build-push-action@v5
# id: built-image
# with:
# context: .
# file: ./docker/Dockerfile
# push: false
# load: true
# tags: claasp-lib
# cache-from: type=local,src=/tmp/.buildx-cache
# cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
# - name: Run pytests
# run: docker run --rm -v $PWD:/home/sage/tii-claasp claasp-lib make remote-pytest
# run: docker run --rm -v $PWD:/home/sage/tii-claasp claasp-lib:claasp-lib make remote-pytest
# - name: Move cache
# if: ${{ always() }}
# run: |
# rm -rf /tmp/.buildx-cache
# mv /tmp/.buildx-cache-new /tmp/.buildx-cache