str($path)->after(base_path().'/')->toString(), glob(base_path('.gitea/workflows/*.yml'))), ]; foreach ($files as $file) { expect(file_get_contents(base_path($file)))->not->toMatch('/github|ghcr\.io/i', "{$file} still refers to GitHub"); } expect(base_path('.github'))->not->toBeDirectory() ->and(glob(base_path('.gitea/workflows/*.yml')))->not->toBeEmpty(); }); test('the website installs SealShare from Gitea', function () { preg_match('/]*id="install".*?<\/section>/s', file_get_contents(base_path('website/index.html')), $install); expect($install[0])->not->toMatch('/github|ghcr\.io/i') ->toContain('gitea.nonameweb.ch/nonameweb/sealshare:latest') ->toContain('https://gitea.nonameweb.ch/noNameWEB/SealShare/raw/branch/main/docker-compose.example.yml'); }); test('images are published to the Gitea registry and releases are made on Gitea', function () { $workflow = file_get_contents(base_path('.gitea/workflows/docker.yml')); expect($workflow) ->toContain('registry: gitea.nonameweb.ch') ->toContain('images: gitea.nonameweb.ch/nonameweb/sealshare') ->toContain('password: ${{ secrets.REGISTRY_TOKEN }}') ->toContain('uses: https://gitea.com/actions/gitea-release-action@v1'); });