Suggest attributes from the include top level node #570
Workflow file for this run
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: Build | |
on: | |
push: | |
branches: | |
- "**" | |
tags: | |
- v* | |
paths-ignore: | |
- '**/*.md' | |
pull_request: | |
branches: | |
- '**' | |
paths-ignore: | |
- '**/*.md' | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: "1.24.3" | |
- uses: golangci/golangci-lint-action@v6 | |
with: | |
version: v1.64 | |
args: --timeout 3m --verbose --exclude-dirs lsp | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Update Docker to 28.0.1 | |
run: | | |
sudo systemctl stop docker.service | |
sudo apt-get purge docker-ce docker-ce-cli containerd.io docker-compose-plugin docker-ce-rootless-extras docker-buildx-plugin | |
sudo apt-get install curl | |
curl -fsSL https://test.docker.com -o get-docker.sh | |
sudo sh ./get-docker.sh --version 28.0.1 | |
- uses: docker/setup-buildx-action@v3 | |
with: | |
use: true | |
- run: docker build -t docker/lsp:test --target test . | |
- run: docker run --rm -v /var/run/docker.sock:/var/run/docker.sock docker/lsp:test make test | |
integration-test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: actions/checkout@v4 (docker/docker-language-server) | |
uses: actions/checkout@v4 | |
with: | |
repository: docker/docker-language-server | |
path: docker-language-server | |
- name: actions/checkout@v4 (docker/vscode-extension) | |
uses: actions/checkout@v4 | |
with: | |
repository: docker/vscode-extension | |
path: vscode-extension | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: "1.24.3" | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: "22.x" | |
- run: make build | |
working-directory: docker-language-server | |
- run: npm install | |
working-directory: vscode-extension | |
- name: Replace the downloaded binary with the one from the build | |
working-directory: vscode-extension | |
run: | | |
rm bin/* | |
mv ../docker-language-server/docker-language-server-linux-amd64 bin | |
- run: sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0 | |
working-directory: vscode-extension | |
- run: xvfb-run --auto-servernum --server-args='-screen 0 1920x1080x24' npm test | |
working-directory: vscode-extension | |
upload: | |
needs: | |
- build | |
- integration-test | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
os: [linux, windows, darwin] | |
arch: [amd64, arm64] | |
include: | |
- os: windows | |
ext: .exe | |
- os: linux | |
ext: "" | |
- os: darwin | |
ext: "" | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: "1.24.3" | |
- name: Build for ${{ matrix.os }}-${{ matrix.arch }} | |
run: | | |
GOOS=${{ matrix.os }} GOARCH=${{ matrix.arch }} BUGSNAG_API_KEY=${{ secrets.BUGSNAG_API_KEY }} make build | |
- name: actions/upload-artifact@v4 (refs/heads) | |
uses: actions/upload-artifact@v4 | |
if: startsWith(github.ref, 'refs/heads') | |
with: | |
name: docker-language-server-${{ matrix.os }}-${{ matrix.arch }}${{ matrix.ext }} | |
path: docker-language-server-${{ matrix.os }}-${{ matrix.arch }}${{ matrix.ext }} | |
if-no-files-found: error | |
- name: Set variables | |
id: set-variables | |
if: startsWith(github.ref, 'refs/tags/v') | |
run: | | |
VERSION=$(git describe --tags --abbrev=0) | |
echo "VERSION=$VERSION" >> "$GITHUB_OUTPUT" | |
- name: Rename the binary to include the version number | |
if: startsWith(github.ref, 'refs/tags/v') | |
run: | | |
mv docker-language-server-${{ matrix.os }}-${{ matrix.arch }}${{ matrix.ext }} docker-language-server-${{ matrix.os }}-${{ matrix.arch }}-${{ steps.set-variables.outputs.VERSION }}${{ matrix.ext }} | |
- name: actions/upload-artifact@v4 (refs/tags/v) | |
uses: actions/upload-artifact@v4 | |
if: startsWith(github.ref, 'refs/tags/v') | |
with: | |
name: docker-language-server-${{ matrix.os }}-${{ matrix.arch }}-${{ steps.set-variables.outputs.VERSION }}${{ matrix.ext }} | |
path: docker-language-server-${{ matrix.os }}-${{ matrix.arch }}-${{ steps.set-variables.outputs.VERSION }}${{ matrix.ext }} | |
if-no-files-found: error | |
- uses: softprops/action-gh-release@c062e08bd532815e2082a85e87e3ef29c3e6d191 # v2.0.8 https://github.com/softprops/action-gh-release/commit/c062e08bd532815e2082a85e87e3ef29c3e6d191 | |
if: startsWith(github.ref, 'refs/tags/v') | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
files: docker-language-server-${{ matrix.os }}-${{ matrix.arch }}-${{ steps.set-variables.outputs.VERSION }}${{ matrix.ext }} | |
fail_on_unmatched_files: true |