Skip to content

Expiermenting with CI. #10

Expiermenting with CI.

Expiermenting with CI. #10

Workflow file for this run

# https://fedoramagazine.org/github-actions-use-podman-to-run-fedora-linux/
name: Fedora CI
on: [push, pull_request]
jobs:
fedora:
strategy:
matrix:
fedora-version: ['36', '37', '38']
runs-on: ubuntu-latest
name: Fedora ${{ matrix.fedora-version }}
steps:
- name: Setup Podman
run: |
sudo apt update
sudo apt-get -y install podman
podman pull fedora:${{ matrix.fedora-version }}
- name: Get source
uses: actions/checkout@v3
with:
submodules: 'true'
path: 'dotfiles'
- name: Create container and run tests
run: |
{
echo 'FROM fedora:${{ matrix.fedora-version }}'
echo '# Set environment variables'
echo 'ENV TZ=America/New_York'
echo 'ENV TERM=linux'
echo 'ENV CI=true'
echo '# Install packages'
echo 'RUN dnf -y update'
echo 'RUN dnf -y install flatpak git dnf-plugins-core zsh'
echo 'RUN dnf clean all'
echo '# Create user'
echo 'RUN adduser testuser && usermod -aG sudo testuser'
echo 'RUN su - testuser'
echo '# Copy dotfiles'
echo 'COPY dotfiles dotfiles'
echo 'WORKDIR /dotfiles'
echo '# Run tests'
echo 'RUN bash --version'
echo 'RUN bash -c "time sh test/bats/bin/bats --print-output-on-failure test/test.bats"'
} > podmanfile
podman build --tag fedora${{ matrix.fedora-version }}test -f ./podmanfile