Re-sign #1061
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: | |
push: | |
branches: [ master, develop ] | |
pull_request: | |
branches: [ master, develop ] | |
jobs: | |
test: | |
name: Test metadata | |
runs-on: ${{ matrix.os }} | |
env: | |
YAML_VER: 0.0.7 | |
strategy: | |
matrix: | |
ghc: | |
- '8.10.7' | |
cabal: | |
- '3.6.2.0' | |
os: | |
- ubuntu-22.04 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2 | |
- uses: haskell-actions/setup@ec49483bfc012387b227434aba94f59a6ecd0900 # v2.7.5 | |
with: | |
ghc-version: ${{ matrix.ghc }} | |
cabal-version: ${{ matrix.cabal }} | |
- name: Cache Cabal | |
uses: actions/cache@937d24475381cd9c75ae6db12cb4e79714b926ed # v2.1.7 | |
env: | |
cache-name: cache-cabal | |
with: | |
path: | | |
~/.cabal/store | |
~/.cabal/packages | |
key: v2-${{ runner.os }}-${{ matrix.ghc }}-${{ matrix.cabal }}-build-${{ hashFiles('cabal.project') }} | |
restore-keys: | | |
v2-${{ runner.os }}-${{ matrix.ghc }}-${{ matrix.cabal }}-build-${{ hashFiles('cabal.project') }} | |
v2-${{ runner.os }}-${{ matrix.ghc }}-${{ matrix.cabal }}-build- | |
v2-${{ runner.os }}-${{ matrix.ghc }} | |
- name: create ~/.local/bin | |
run: mkdir -p "$HOME/.local/bin" | |
shell: bash | |
- name: Add ~/.local/bin to PATH | |
run: echo "$HOME/.local/bin" >> $GITHUB_PATH | |
shell: bash | |
- name: install yamllint | |
run: pip install yamllint | |
- name: Update cabal cache | |
run: cabal update | |
shell: bash | |
- name: Install some deps | |
run: | | |
export DEBIAN_FRONTEND=noninteractive | |
export TZ=Asia/Singapore | |
sudo apt install -y libarchive-dev | |
shell: bash | |
- name: Install ghcup-gen | |
run: | | |
cabal install --installdir="$HOME/.local/bin" --overwrite-policy=always --install-method=copy ghcup-gen | |
shell: bash | |
- name: Check yaml | |
run: | | |
ghcup-gen -- check -f ghcup-${{ env.YAML_VER }}.yaml | |
yamllint ghcup-${{ env.YAML_VER }}.yaml | |
python3 -c "import yaml ; stream = open('ghcup-${{ env.YAML_VER }}.yaml', 'r') ; yaml.safe_load(stream)" | |
shell: bash | |
- name: Check tarballs | |
run: | | |
ghcup-gen -- check-tarballs -f ghcup-${{ env.YAML_VER }}.yaml -u 'ghcup-.*' | |
shell: bash |