mirror of
https://github.com/ScuroNeko/mtg.git
synced 2026-08-31 13:14:02 +03:00
Test docker
This commit is contained in:
+57
-65
@@ -35,59 +35,59 @@ on:
|
||||
- ready_for_review
|
||||
|
||||
jobs:
|
||||
test:
|
||||
name: Test
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 10
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- uses: jdx/mise-action@v3
|
||||
name: Install mise
|
||||
|
||||
- name: Run tests
|
||||
run: mise tasks run covtest
|
||||
|
||||
- name: Collect coverage
|
||||
uses: codecov/codecov-action@v5
|
||||
with:
|
||||
files: ./coverage.txt
|
||||
|
||||
fuzz:
|
||||
name: Fuzzing
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 20
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- uses: jdx/mise-action@v3
|
||||
name: Install mise
|
||||
|
||||
- name: Run fuzzing
|
||||
run: mise tasks run 'test:fuzz:*'
|
||||
|
||||
|
||||
lint:
|
||||
name: Lint
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 5
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- uses: jdx/mise-action@v3
|
||||
name: Install mise
|
||||
|
||||
- name: Run linter
|
||||
run: mise tasks run lint
|
||||
# test:
|
||||
# name: Test
|
||||
# runs-on: ubuntu-latest
|
||||
# timeout-minutes: 10
|
||||
# steps:
|
||||
# - name: Checkout
|
||||
# uses: actions/checkout@v6
|
||||
# with:
|
||||
# submodules: recursive
|
||||
#
|
||||
# - uses: jdx/mise-action@v3
|
||||
# name: Install mise
|
||||
#
|
||||
# - name: Run tests
|
||||
# run: mise tasks run covtest
|
||||
#
|
||||
# - name: Collect coverage
|
||||
# uses: codecov/codecov-action@v5
|
||||
# with:
|
||||
# files: ./coverage.txt
|
||||
#
|
||||
# fuzz:
|
||||
# name: Fuzzing
|
||||
# runs-on: ubuntu-latest
|
||||
# timeout-minutes: 20
|
||||
# steps:
|
||||
# - name: Checkout
|
||||
# uses: actions/checkout@v6
|
||||
# with:
|
||||
# submodules: recursive
|
||||
#
|
||||
# - uses: jdx/mise-action@v3
|
||||
# name: Install mise
|
||||
#
|
||||
# - name: Run fuzzing
|
||||
# run: mise tasks run 'test:fuzz:*'
|
||||
#
|
||||
#
|
||||
# lint:
|
||||
# name: Lint
|
||||
# runs-on: ubuntu-latest
|
||||
# timeout-minutes: 5
|
||||
# steps:
|
||||
# - name: Checkout
|
||||
# uses: actions/checkout@v6
|
||||
# with:
|
||||
# submodules: recursive
|
||||
#
|
||||
# - uses: jdx/mise-action@v3
|
||||
# name: Install mise
|
||||
#
|
||||
# - name: Run linter
|
||||
# run: mise tasks run lint
|
||||
|
||||
docker:
|
||||
name: Docker
|
||||
@@ -103,7 +103,7 @@ jobs:
|
||||
id: meta
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: nineseconds/mtg,ghcr.io/9seconds/mtg
|
||||
images: nineseconds/mtg
|
||||
tags: |
|
||||
type=semver,pattern={{version}}
|
||||
|
||||
@@ -121,16 +121,8 @@ jobs:
|
||||
restore-keys: |
|
||||
${{ 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
|
||||
if: github.event_name != 'pull_request'
|
||||
# if: github.event_name != 'pull_request'
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
@@ -143,7 +135,7 @@ jobs:
|
||||
context: .
|
||||
platforms: linux/amd64,linux/arm64,linux/386,linux/arm/v7,linux/arm/v6
|
||||
push: false
|
||||
tags: ${{ steps.docker_meta.outputs.tags }}
|
||||
labels: ${{ steps.docker_meta.outputs.labels }}
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
cache-from: type=local,src=/tmp/buildx-cache
|
||||
cache-to: type=local,dest=/tmp/buildx-cache
|
||||
|
||||
Reference in New Issue
Block a user