Added Fedora to CI. #1
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', '39'] | |
runs-on: ubuntu-latest | |
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 TZ to ensure the test using timestamp' | |
echo 'ENV TZ=America/New_York' | |
echo 'ENV TERM=linux' | |
echo 'ENV CI=true' | |
echo 'COPY dotfiles dotfiles' | |
echo 'WORKDIR /dotfiles' | |
echo 'RUN npm install -g bats' | |
echo 'RUN bash --version' | |
echo 'RUN bash -c "time bats --print-output-on-failure test/test.bats"' | |
} > podmanfile | |
podman build --tag fedora${{ matrix.fedora-version }}test -f ./podmanfile |