Skip to content

Commit 1edca32

Browse files
committed
Replace the old GitHub action by a new one based on Docker
1 parent caa359f commit 1edca32

2 files changed

Lines changed: 37 additions & 35 deletions

File tree

.github/workflows/tests.yml

Lines changed: 0 additions & 35 deletions
This file was deleted.

.github/workflows/tox-docker.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Tox (Docker)
2+
3+
on:
4+
push:
5+
pull_request:
6+
workflow_dispatch:
7+
8+
jobs:
9+
tox:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v4
15+
16+
# Enables layer caching with BuildKit/buildx
17+
- name: Set up Docker Buildx
18+
uses: docker/setup-buildx-action@v3
19+
20+
# Build the image from your Dockerfile and cache layers in GitHub Actions cache storage
21+
- name: Build test image
22+
uses: docker/build-push-action@v6
23+
with:
24+
context: .
25+
file: ./Dockerfile
26+
load: true
27+
tags: python-asn1:ci
28+
cache-from: type=gha
29+
cache-to: type=gha,mode=max
30+
31+
# Run tox inside the built container
32+
- name: Run tox in container
33+
run: |
34+
docker run --rm \
35+
-v "${{ github.workspace }}:/home/user/project" \
36+
-w /home/user/project \
37+
python-asn1:ci

0 commit comments

Comments
 (0)