Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI(oay): add CI for oay-webdav #2957

Merged
merged 3 commits into from
Aug 28, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 71 additions & 0 deletions .github/workflows/oay_test_webdav.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

name: Oay Test WebDAV
Young-Flash marked this conversation as resolved.
Show resolved Hide resolved

on:
push:
branches:
- main
pull_request:
branches:
- main
paths:
- "bin/oay/**"
- ".github/workflows/oay_test_webdav.yml"
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }}
cancel-in-progress: true

jobs:
oay-webdav-test:
Young-Flash marked this conversation as resolved.
Show resolved Hide resolved
runs-on: ubuntu-latest
if: github.event_name == 'push' || !github.event.pull_request.head.repo.fork
Young-Flash marked this conversation as resolved.
Show resolved Hide resolved
steps:
- uses: actions/checkout@v3
- name: Setup Rust toolchain
uses: ./.github/actions/setup

- name: Install litmus
run: |
curl -O http://www.webdav.org/neon/litmus/litmus-0.13.tar.gz
tar xf litmus-0.13.tar.gz
cd litmus-0.13
./configure
make

- name: Build and Start WebDAV service
run: |
cargo build --package oay --bin webdav --release
nohup cargo run --package oay --bin webdav --release &
Young-Flash marked this conversation as resolved.
Show resolved Hide resolved

- name: Run litmus tests
run: |
cd litmus-0.13
TESTS="http basic copymove" HTDOCS=htdocs TESTROOT=. ./litmus http://localhost:3000 >> litmus.log
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we remove this redirect? I prefer to print log directly to console.


- name: Check litmus test results
run: |
if grep -q "FATAL" litmus-0.13/litmus.log; then
cat litmus-0.13/litmus.log
echo "Tests failed"
exit 1
else
echo "All tests passed"
fi