-
Notifications
You must be signed in to change notification settings - Fork 68
57 lines (49 loc) · 1.7 KB
/
nix.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
54
55
56
57
name: CCM Integration tests (using Nix)
on:
workflow_call:
inputs:
reloc_version:
required: true
type: string
jobs:
build:
runs-on: ubuntu-latest
continue-on-error: true
steps:
- uses: actions/checkout@v3
- uses: cachix/install-nix-action@v20
with:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
- name: Cache binary versions
id: cache-versions
uses: actions/cache@v2
with:
path: |
~/.ccm/repository
~/.ccm/scylla-repository
key: ${{ runner.os }}-${{ inputs.reloc_version }}-binaries
- name: Set environmental variables
run: |
echo "SCYLLA_VERSION=unstable/master:${{ inputs.reloc_version }}" >> "$GITHUB_ENV"
- name: Download versions
if: steps.cache-versions.outputs.cache-hit != 'true'
run: |
normalized=$(echo ${{ inputs.reloc_version }} | tr ':' '_')
if [ ! -f ~/.ccm/scylla-repository/unstable/master/$normalized ]; then
nix develop --command ./ccm create temp -n 1 --scylla --version $SCYLLA_VERSION
nix develop --command ./ccm remove
fi
nix develop --command ./ccm create temp-cas -n 1 --version 3.11.4 > /dev/null
nix develop --command ./ccm remove
- name: Test with pytest (python 3.9)
run: |
nix develop --command python3.9 -m pytest ./tests -x
- name: Test with pytest (python 3.11)
run: |
nix develop --command python3.11 -m pytest ./tests -x
- name: Copy logs/results
if: contains(github.event.pull_request.labels.*.name, 'PR-upload-log')
uses: actions/upload-artifact@v4
with:
name: ccm-tests-log
path: tests/test_results/