mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-05-14 05:41:29 +00:00
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 6 to 7. - [Release notes](https://github.com/docker/build-push-action/releases) - [Commits](https://github.com/docker/build-push-action/compare/v6...v7) --- updated-dependencies: - dependency-name: docker/build-push-action dependency-version: '7' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
119 lines
3.2 KiB
YAML
119 lines
3.2 KiB
YAML
name: "pjdfstest POSIX Compliance"
|
|
|
|
on:
|
|
push:
|
|
branches: [ master, main ]
|
|
paths:
|
|
- 'weed/mount/**'
|
|
- 'weed/filer/**'
|
|
- 'test/pjdfstest/**'
|
|
- '.github/workflows/pjdfstest.yml'
|
|
pull_request:
|
|
branches: [ master, main ]
|
|
paths:
|
|
- 'weed/mount/**'
|
|
- 'weed/filer/**'
|
|
- 'test/pjdfstest/**'
|
|
- '.github/workflows/pjdfstest.yml'
|
|
workflow_dispatch:
|
|
|
|
concurrency:
|
|
group: pjdfstest/${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
pjdfstest:
|
|
name: pjdfstest
|
|
runs-on: ubuntu-22.04
|
|
timeout-minutes: 60
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v6
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v6
|
|
with:
|
|
go-version-file: 'go.mod'
|
|
|
|
- name: Start local Docker registry
|
|
run: docker run -d --restart=always -p 5000:5000 --name registry registry:2
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v4
|
|
with:
|
|
driver-opts: network=host
|
|
|
|
- name: Build weed race binary
|
|
run: |
|
|
cd docker
|
|
make binary_race
|
|
|
|
- name: Build SeaweedFS e2e image
|
|
uses: docker/build-push-action@v7
|
|
with:
|
|
context: docker
|
|
file: docker/Dockerfile.e2e
|
|
tags: localhost:5000/chrislusf/seaweedfs:e2e
|
|
push: true
|
|
cache-from: type=gha,scope=pjdfstest-e2e
|
|
cache-to: type=gha,mode=max,scope=pjdfstest-e2e
|
|
|
|
- name: Tag e2e image for docker compose
|
|
run: |
|
|
docker pull localhost:5000/chrislusf/seaweedfs:e2e
|
|
docker tag localhost:5000/chrislusf/seaweedfs:e2e chrislusf/seaweedfs:e2e
|
|
|
|
- name: Build pjdfstest image
|
|
uses: docker/build-push-action@v7
|
|
with:
|
|
context: test/pjdfstest
|
|
build-contexts: |
|
|
chrislusf/seaweedfs:e2e=docker-image://localhost:5000/chrislusf/seaweedfs:e2e
|
|
tags: localhost:5000/chrislusf/seaweedfs:pjdfstest
|
|
push: true
|
|
cache-from: type=gha,scope=pjdfstest-harness
|
|
cache-to: type=gha,mode=max,scope=pjdfstest-harness
|
|
|
|
- name: Tag pjdfstest image for docker compose
|
|
run: |
|
|
docker pull localhost:5000/chrislusf/seaweedfs:pjdfstest
|
|
docker tag localhost:5000/chrislusf/seaweedfs:pjdfstest chrislusf/seaweedfs:pjdfstest
|
|
|
|
- name: Start SeaweedFS cluster
|
|
run: |
|
|
docker compose -f test/pjdfstest/docker-compose.yml up --wait
|
|
|
|
- name: Run pjdfstest
|
|
run: |
|
|
set -o pipefail
|
|
docker compose -f test/pjdfstest/docker-compose.yml exec -T mount \
|
|
/run.sh 2>&1 | tee /tmp/pjdfstest-output.log
|
|
|
|
- name: Collect logs
|
|
if: always()
|
|
run: |
|
|
mkdir -p /tmp/pjdfstest-docker-logs
|
|
for svc in master volume filer mount; do
|
|
docker compose -f test/pjdfstest/docker-compose.yml logs "$svc" \
|
|
> "/tmp/pjdfstest-docker-logs/${svc}.log" 2>&1 || true
|
|
done
|
|
|
|
- name: Tear down
|
|
if: always()
|
|
run: |
|
|
docker compose -f test/pjdfstest/docker-compose.yml down -v
|
|
|
|
- name: Upload logs
|
|
if: always()
|
|
uses: actions/upload-artifact@v7
|
|
with:
|
|
name: pjdfstest-results
|
|
path: |
|
|
/tmp/pjdfstest-output.log
|
|
/tmp/pjdfstest-docker-logs/
|
|
retention-days: 7
|