diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 16:27:43 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 16:27:43 +0000 |
commit | 5a5427c3888e2619d53f6943447b7db5bf082366 (patch) | |
tree | 3ecafb5ca77f89abdeddb14eb42f90187b811e0d /.github/workflows/asciinema.yml | |
parent | Initial commit. (diff) | |
download | asciinema-upstream.tar.xz asciinema-upstream.zip |
Adding upstream version 2.2.0.upstream/2.2.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '.github/workflows/asciinema.yml')
-rw-r--r-- | .github/workflows/asciinema.yml | 110 |
1 files changed, 110 insertions, 0 deletions
diff --git a/.github/workflows/asciinema.yml b/.github/workflows/asciinema.yml new file mode 100644 index 0000000..7a3200e --- /dev/null +++ b/.github/workflows/asciinema.yml @@ -0,0 +1,110 @@ +--- +name: build +on: + - push + - pull_request +jobs: + # Code style checks + health: + name: code health check + runs-on: ubuntu-latest + steps: + - name: checkout asciinema + uses: actions/checkout@v3 + - name: setup Python + uses: actions/setup-python@v3 + with: + python-version: "3.10" + - name: install dependencies + run: pip install build cmarkgfm pycodestyle twine + - name: Run pycodestyle + run: > + find . + -name '*\.py' + -exec pycodestyle --ignore=E402,E501,E722,W503 "{}" \+ + - name: Run twine + run: | + python3 -m build + twine check dist/* + # Asciinema checks + asciinema: + name: Asciinema + runs-on: ubuntu-latest + strategy: + matrix: + python: + - "3.6" + - "3.7" + - "3.8" + - "3.9" + - "3.10" + env: + TERM: dumb + steps: + - name: checkout Asciinema + uses: actions/checkout@v3 + - name: setup Python + uses: actions/setup-python@v3 + with: + python-version: ${{ matrix.python }} + - name: install dependencies + run: pip install pytest + - name: run Asciinema tests + run: script -e -c make test + build_distros: + name: build distro images + strategy: + matrix: + distros: + - alpine + - arch + - centos + - debian + - fedora + - ubuntu + runs-on: ubuntu-latest + steps: + - name: Set up Docker buildx + id: buildx + uses: docker/setup-buildx-action@v2 + - name: Authenticate to GHCR + uses: docker/login-action@v2 + with: + registry: ghcr.io + username: "${{ github.actor }}" + password: "${{ secrets.GITHUB_TOKEN }}" + - name: "Build ${{ matrix.distros }} image" + uses: docker/build-push-action@v3 + with: + file: "tests/distros/Dockerfile.${{ matrix.distros }}" + tags: | + "ghcr.io/${{ github.repository }}:${{ matrix.distros }}" + push: true + test_distros: + name: integration test distro images + needs: build_distros + strategy: + matrix: + distros: + - alpine + - arch + - centos + - debian + - fedora + - ubuntu + runs-on: ubuntu-latest + container: + image: "ghcr.io/${{ github.repository }}:${{ matrix.distros }}" + credentials: + username: "${{ github.actor }}" + password: "${{ secrets.GITHUB_TOKEN }}" + # https://github.community/t/permission-problems-when-checking-out-code-as-part-of-github-action/202263 + options: "--interactive --tty --user=1001:121" + steps: + - name: checkout Asciinema + uses: actions/checkout@v3 + - name: run integration tests + env: + TERM: dumb + shell: 'script --return --quiet --command "bash {0}"' + run: make test.integration |