build: project #204
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |