Add confirmation dialog before installing or uninstalling #29
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
name: Tests | |
on: | |
pull_request: | |
push: | |
branches: ["main"] | |
jobs: | |
generateMatrix: | |
name: "Generate matrix from cabal" | |
runs-on: ubuntu-latest | |
outputs: | |
matrix: ${{ steps.set-matrix.outputs.matrix }} | |
steps: | |
- name: Checkout base repo | |
uses: actions/checkout@v3 | |
- name: Extract the tested GHC versions | |
id: set-matrix | |
run: | | |
wget https://github.com/Kleidukos/get-tested/releases/download/v0.1.4.0/get-tested-0.1.4.0-linux-amd64 -O get-tested | |
chmod +x get-tested | |
./get-tested --ubuntu ghcup-gtk.cabal >> $GITHUB_OUTPUT | |
tests: | |
name: ${{ matrix.ghc }} on ${{ matrix.os }} | |
needs: generateMatrix | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: ${{ fromJSON(needs.generateMatrix.outputs.matrix) }} | |
steps: | |
- uses: actions/checkout@v3 | |
if: github.event.action == 'opened' || github.event.action == 'synchronize' || github.event.ref == 'refs/heads/main' | |
- name: "Configure ghcup" | |
run: | | |
ghcup config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.7.yaml; | |
- name: Set up Haskell | |
id: setup-haskell | |
uses: haskell/actions/setup@v2 | |
with: | |
ghc-version: ${{ matrix.ghc }} | |
cabal-version: ${{ matrix.cabal }} | |
- name: Configure environment | |
run: | | |
sudo apt update | |
sudo apt install -y libgirepository1.0-dev libwebkit2gtk-4.0-dev \ | |
libgtksourceview-3.0-dev libgtk-4-bin libgtk-4-common libgtk-4-dev \ | |
libadwaita-1-dev | |
echo "$HOME/.ghcup/bin" >> $GITHUB_PATH | |
echo "$HOME/.cabal/bin" >> $GITHUB_PATH | |
echo "$HOME/.local/bin" >> $GITHUB_PATH | |
cabal freeze | |
- name: Cache | |
uses: actions/cache@v3 | |
with: | |
path: ${{ steps.setup-haskell.outputs.cabal-store }} | |
key: ${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles('cabal.project.freeze') }} | |
restore-keys: ${{ runner.os }}-${{ matrix.ghc }}- | |
- name: Build | |
run: | | |
make build | |
- name: Test | |
run: | | |
cabal test |