Merge pull request #85 from schlich/playwright-0.2.0 #250
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: "CI - Test Features" | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| workflow_dispatch: | |
| jobs: | |
| validate: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: "Validate devcontainer-feature.json files" | |
| uses: devcontainers/action@v1 | |
| with: | |
| validate-only: "true" | |
| base-path-to-features: "./src" | |
| test-debian: | |
| needs: validate | |
| name: "Test on Debian Linux" | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| features: | |
| - rye | |
| - cypress | |
| - starship | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: "Install latest devcontainer CLI" | |
| run: npm install -g @devcontainers/cli | |
| - name: "Generating Debian tests for '${{ matrix.features }}'" | |
| run: devcontainer features test -f ${{ matrix.features }} -i debian:bookworm --preserve-test-containers | |
| test-ubuntu: | |
| needs: validate | |
| name: "Test on Ubuntu Linux" | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| features: | |
| - rye | |
| - cypress | |
| - playwright | |
| - starship | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: "Install latest devcontainer CLI" | |
| run: npm install -g @devcontainers/cli | |
| - name: "Generating Debian tests for '${{ matrix.features }}'" | |
| run: devcontainer features test -f ${{ matrix.features }} -i ubuntu --preserve-test-containers | |
| publish: | |
| name: "Publish Features & Update Documentation" | |
| if: ${{ github.ref == 'refs/heads/main' }} | |
| needs: | |
| - test-ubuntu | |
| - test-debian | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| packages: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: "Publish Features" | |
| uses: devcontainers/action@v1 | |
| with: | |
| publish-features: "true" | |
| base-path-to-features: "./src" | |
| generate-docs: "true" | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Create PR for Documentation | |
| id: push_image_info | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| set -e | |
| echo "Start." | |
| # Configure git and Push updates | |
| git config --global user.email github-actions[bot]@users.noreply.github.com | |
| git config --global user.name github-actions[bot] | |
| git config pull.rebase false | |
| branch=automated-documentation-update-$GITHUB_RUN_ID | |
| git checkout -b $branch | |
| message='Automated documentation update' | |
| # Add / update and commit | |
| git add */**/README.md | |
| git commit -m 'Automated documentation update [skip ci]' || export NO_UPDATES=true | |
| # Push | |
| if [ "$NO_UPDATES" != "true" ] ; then | |
| git push origin "$branch" | |
| gh pr create --title "$message" --body "$message" | |
| fi |