-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (39 loc) · 1.19 KB
/
main.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
name: CI
on: [push]
jobs:
test:
name: ARK Resolver Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: astral-sh/setup-uv@v5
- run: |
uv sync
echo "$VIRTUAL_ENV/bin" >> $GITHUB_PATH
echo "VIRTUAL_ENV=$VIRTUAL_ENV" >> $GITHUB_ENV
- uses: dtolnay/rust-toolchain@stable
- uses: extractions/setup-just@v2
- uses: docker/setup-buildx-action@v3
- name: Run Rust unit tests
run: just test
- name: Run Python unit tests
run: just pytest
- name: Build ARK resolver image
run: just docker-build-intel
# publish only for develop and tags
publish:
name: Publish to Dockerhub
needs: [test]
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags')
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: extractions/setup-just@v2
- name: build and publish image to Dockerhub
run: |
echo ${{ secrets.DOCKER_HUB_TOKEN }} | docker login -u ${{ secrets.DOCKER_USER }} --password-stdin
just docker-publish-intel