2022-03-05 00:04:55 +01:00
|
|
|
name: Test against pacman-git
|
|
|
|
on:
|
2022-03-05 00:30:15 +01:00
|
|
|
pull_request:
|
2022-03-05 00:04:55 +01:00
|
|
|
paths-ignore:
|
|
|
|
- "doc/**"
|
2022-03-05 00:30:15 +01:00
|
|
|
- "**/*.po"
|
2022-03-05 00:04:55 +01:00
|
|
|
- "README.md"
|
|
|
|
- ".gitignore"
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
2022-12-18 21:42:22 +01:00
|
|
|
name: Lint and test yay (-git)
|
2022-03-05 00:04:55 +01:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
container:
|
|
|
|
image: jguer/yay-builder:latest
|
|
|
|
steps:
|
2022-12-18 21:42:22 +01:00
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: actions/cache@v3
|
2022-03-05 00:04:55 +01:00
|
|
|
with:
|
|
|
|
path: ~/go/pkg/mod
|
|
|
|
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
|
|
|
restore-keys: |
|
|
|
|
${{ runner.os }}-go-
|
2022-12-18 21:42:22 +01:00
|
|
|
- uses: actions/cache@v3
|
|
|
|
with:
|
|
|
|
path: /home/runner/work/yay/yay/pacman-git
|
|
|
|
key: ${{ runner.os }}-pacman-${{ hashFiles('/home/runner/work/yay/yay/pacman-git/PKGBUILD') }}
|
|
|
|
restore-keys: |
|
|
|
|
${{ runner.os }}-pacman-
|
2022-03-05 00:04:55 +01:00
|
|
|
- name: checkout pacman-git
|
|
|
|
run: |
|
2022-12-18 21:42:22 +01:00
|
|
|
git -C ./pacman-git pull || git clone https://aur.archlinux.org/pacman-git
|
2022-03-05 00:04:55 +01:00
|
|
|
useradd github
|
|
|
|
echo 'github ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers
|
2022-12-18 19:24:56 +01:00
|
|
|
chmod -R 777 pacman-git
|
2022-12-18 21:42:22 +01:00
|
|
|
su github -c 'cd pacman-git; yes | makepkg -i --nocheck'
|
2022-03-05 00:04:55 +01:00
|
|
|
- name: Run Build and Tests with pacman-git
|
|
|
|
run: make test
|