Compare commits
1 Commits
master
...
ci-hygiene
| Author | SHA1 | Date | |
|---|---|---|---|
| d9ec8e7d28 |
@@ -0,0 +1,10 @@
|
|||||||
|
version: 2
|
||||||
|
updates:
|
||||||
|
- package-ecosystem: github-actions
|
||||||
|
directory: /
|
||||||
|
schedule:
|
||||||
|
interval: weekly
|
||||||
|
groups:
|
||||||
|
github-actions:
|
||||||
|
patterns:
|
||||||
|
- "*"
|
||||||
@@ -7,45 +7,77 @@ on:
|
|||||||
workflow_dispatch: # this is a nice option that will enable a button w/ inputs
|
workflow_dispatch: # this is a nice option that will enable a button w/ inputs
|
||||||
inputs:
|
inputs:
|
||||||
git-ref:
|
git-ref:
|
||||||
description: Git Ref (Optional)
|
description: Git Ref (Optional)
|
||||||
required: false
|
required: false
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-and-test:
|
build-and-test:
|
||||||
name: Build and test
|
name: Build and test
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-24.04
|
||||||
|
timeout-minutes: 30
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
|
|
||||||
- uses: actions/setup-python@v4
|
- name: Set up Python
|
||||||
|
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
|
||||||
|
with:
|
||||||
|
python-version: '3.12'
|
||||||
|
|
||||||
- name: Install build dependencies
|
- name: Install build dependencies
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install valgrind gcc ninja-build meson libglib2.0-dev libfuse3-dev
|
sudo apt-get install -y valgrind gcc ninja-build libglib2.0-dev libfuse3-dev openssh-server openssh-client fuse3
|
||||||
|
|
||||||
|
- name: Check FUSE availability
|
||||||
|
run: |
|
||||||
|
test -e /dev/fuse
|
||||||
|
command -v fusermount3
|
||||||
|
|
||||||
- name: Install meson
|
- name: Install meson
|
||||||
run: pip3 install meson pytest
|
run: pip3 install meson pytest pytest-timeout
|
||||||
|
|
||||||
- name: build
|
- name: build
|
||||||
run: |
|
run: |
|
||||||
mkdir build; cd build
|
meson setup build
|
||||||
meson ..
|
ninja -C build
|
||||||
ninja
|
|
||||||
|
|
||||||
# cd does not persist across steps
|
# cd does not persist across steps
|
||||||
- name: upload build artifact
|
- name: upload build artifact
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
||||||
with:
|
with:
|
||||||
name: sshfs
|
name: sshfs
|
||||||
path: build/sshfs
|
path: build/sshfs
|
||||||
|
if-no-files-found: ignore
|
||||||
|
|
||||||
- name: make ssh into localhost without prompt possible for tests
|
- name: Setup SSH
|
||||||
run: |
|
run: |
|
||||||
ssh-keygen -b 2048 -t rsa -f ~/.ssh/id_rsa -q -N ""
|
mkdir -p ~/.ssh
|
||||||
cat ~/.ssh/id_rsa.pub > ~/.ssh/authorized_keys
|
chmod 700 ~/.ssh
|
||||||
|
ssh-keygen -t ed25519 -f ~/.ssh/id_ed25519 -q -N ""
|
||||||
|
cat ~/.ssh/id_ed25519.pub > ~/.ssh/authorized_keys
|
||||||
|
chmod 600 ~/.ssh/authorized_keys
|
||||||
|
sudo systemctl start ssh || sudo service ssh start
|
||||||
|
ssh -o StrictHostKeyChecking=no -o BatchMode=yes localhost true
|
||||||
|
|
||||||
- name: run tests
|
- name: run tests
|
||||||
run: |
|
run: |
|
||||||
cd build
|
cd build
|
||||||
python3 -m pytest test/
|
python3 -m pytest test/ --timeout=300 --junitxml=test-results.xml --maxfail=99
|
||||||
|
timeout-minutes: 20
|
||||||
|
|
||||||
|
- name: upload test results
|
||||||
|
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
||||||
|
if: always()
|
||||||
|
with:
|
||||||
|
name: test-results
|
||||||
|
path: |
|
||||||
|
build/test-results.xml
|
||||||
|
build/meson-logs/
|
||||||
|
|||||||
Reference in New Issue
Block a user