Test docker

This commit is contained in:
9seconds
2026-02-11 12:13:55 +01:00
parent f7f6a7637c
commit 3e4faf6ba6
+57 -65
View File
@@ -35,59 +35,59 @@ on:
- ready_for_review - ready_for_review
jobs: jobs:
test: # test:
name: Test # name: Test
runs-on: ubuntu-latest # runs-on: ubuntu-latest
timeout-minutes: 10 # timeout-minutes: 10
steps: # steps:
- name: Checkout # - name: Checkout
uses: actions/checkout@v6 # uses: actions/checkout@v6
with: # with:
submodules: recursive # submodules: recursive
#
- uses: jdx/mise-action@v3 # - uses: jdx/mise-action@v3
name: Install mise # name: Install mise
#
- name: Run tests # - name: Run tests
run: mise tasks run covtest # run: mise tasks run covtest
#
- name: Collect coverage # - name: Collect coverage
uses: codecov/codecov-action@v5 # uses: codecov/codecov-action@v5
with: # with:
files: ./coverage.txt # files: ./coverage.txt
#
fuzz: # fuzz:
name: Fuzzing # name: Fuzzing
runs-on: ubuntu-latest # runs-on: ubuntu-latest
timeout-minutes: 20 # timeout-minutes: 20
steps: # steps:
- name: Checkout # - name: Checkout
uses: actions/checkout@v6 # uses: actions/checkout@v6
with: # with:
submodules: recursive # submodules: recursive
#
- uses: jdx/mise-action@v3 # - uses: jdx/mise-action@v3
name: Install mise # name: Install mise
#
- name: Run fuzzing # - name: Run fuzzing
run: mise tasks run 'test:fuzz:*' # run: mise tasks run 'test:fuzz:*'
#
#
lint: # lint:
name: Lint # name: Lint
runs-on: ubuntu-latest # runs-on: ubuntu-latest
timeout-minutes: 5 # timeout-minutes: 5
steps: # steps:
- name: Checkout # - name: Checkout
uses: actions/checkout@v6 # uses: actions/checkout@v6
with: # with:
submodules: recursive # submodules: recursive
#
- uses: jdx/mise-action@v3 # - uses: jdx/mise-action@v3
name: Install mise # name: Install mise
#
- name: Run linter # - name: Run linter
run: mise tasks run lint # run: mise tasks run lint
docker: docker:
name: Docker name: Docker
@@ -103,7 +103,7 @@ jobs:
id: meta id: meta
uses: docker/metadata-action@v5 uses: docker/metadata-action@v5
with: with:
images: nineseconds/mtg,ghcr.io/9seconds/mtg images: nineseconds/mtg
tags: | tags: |
type=semver,pattern={{version}} type=semver,pattern={{version}}
@@ -121,16 +121,8 @@ jobs:
restore-keys: | restore-keys: |
${{ runner.os }}-buildx- ${{ runner.os }}-buildx-
- name: Login to GHCR.io
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GH_PAT }}
- name: Login to DockerHub - name: Login to DockerHub
if: github.event_name != 'pull_request' # if: github.event_name != 'pull_request'
uses: docker/login-action@v3 uses: docker/login-action@v3
with: with:
username: ${{ secrets.DOCKERHUB_USERNAME }} username: ${{ secrets.DOCKERHUB_USERNAME }}
@@ -143,7 +135,7 @@ jobs:
context: . context: .
platforms: linux/amd64,linux/arm64,linux/386,linux/arm/v7,linux/arm/v6 platforms: linux/amd64,linux/arm64,linux/386,linux/arm/v7,linux/arm/v6
push: false push: false
tags: ${{ steps.docker_meta.outputs.tags }} tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.docker_meta.outputs.labels }} labels: ${{ steps.meta.outputs.labels }}
cache-from: type=local,src=/tmp/buildx-cache cache-from: type=local,src=/tmp/buildx-cache
cache-to: type=local,dest=/tmp/buildx-cache cache-to: type=local,dest=/tmp/buildx-cache