Added new packages. #9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 '# 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 |