-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (43 loc) · 1.28 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
43
44
45
46
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
with:
version: "0.6.2"
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- uses: dtolnay/rust-toolchain@stable
- uses: extractions/setup-just@v2
- uses: docker/setup-buildx-action@v3
- uses: docker/setup-docker-action@v4
- name: Install dependencies
run: just install
- 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