-
Notifications
You must be signed in to change notification settings - Fork 3
38 lines (38 loc) · 1.11 KB
/
UnitTest.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
name: UnitTest
on: [push]
jobs:
version:
name: define version
runs-on: [self-hosted, genin]
outputs:
VERSION: ${{ steps.get_last_tag.outputs.VERSION }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Get version from tag
id: get_last_tag
run: |
if [[ ${{ github.ref_name }} == 'master' ]]; then
echo "VERSION=$(git describe --tags $(git rev-list --tags --max-count=1))" >> $GITHUB_OUTPUT
else
echo "VERSION=$(git describe --tags $(git rev-list --tags --max-count=1))~rc" >> $GITHUB_OUTPUT
fi
test:
name: Cargo run tests
needs: [version]
runs-on: [self-hosted, genin]
container:
image: docker.binary.picodata.io/rust-builder-stable:latest
steps:
- name: Run tests
run: cargo test
- name: Clean workspace
run: rm -rf ..?* .[!.]* *
if: always()
call_integrations_tests:
name: IntegrationTest
needs: [version]
uses: ./.github/workflows/IntegrationTest.yaml
with:
VERSION: ${{ needs.version.outputs.VERSION }}