diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 1ca151e..654f3d9 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -3,8 +3,7 @@ # Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information. #------------------------------------------------------------------------------------------------------------- -FROM debian:latest -# FROM debian:8 +FROM debian:bookworm # Avoid warnings by switching to noninteractive ENV DEBIAN_FRONTEND=noninteractive @@ -14,16 +13,16 @@ RUN apt-get update \ && apt-get -y install --no-install-recommends apt-utils 2>&1 \ # # Install the Azure CLI - && apt-get install -y apt-transport-https curl gnupg2 lsb-release \ - && echo "deb [arch=amd64] https://packages.microsoft.com/repos/azure-cli/ $(lsb_release -cs) main" > /etc/apt/sources.list.d/azure-cli.list \ - && curl -sL https://packages.microsoft.com/keys/microsoft.asc | apt-key add - 2>/dev/null \ + && apt-get install -y apt-transport-https ca-certificates curl gnupg lsb-release \ + && mkdir -p /etc/apt/keyrings \ + && curl -fsSL https://packages.microsoft.com/keys/microsoft.asc \ + | gpg --dearmor -o /etc/apt/keyrings/microsoft.gpg \ + && chmod go+r /etc/apt/keyrings/microsoft.gpg \ + && echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/microsoft.gpg] https://packages.microsoft.com/repos/azure-cli/ $(lsb_release -cs) main" \ + > /etc/apt/sources.list.d/azure-cli.list \ && apt-get update RUN apt-get install -y azure-cli -# RUN apt-get install -y azure-cli=2.0.67-1~jessie -# RUN apt-get install -y azure-cli=2.0.64-1~jessie -# RUN apt-get install -y azure-cli=2.0.63-1~jessie -# RUN apt-get install -y azure-cli=2.0.26-1~jessie # Switch back to dialog for any ad-hoc use of apt-get ENV DEBIAN_FRONTEND=dialog diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..9f9c1ab --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,31 @@ +name: CI + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-node@v4 + with: + node-version: '20' + + - name: Install dependencies + run: npm ci + + - name: Compile extension + run: npm run compile + + - name: Build test image + run: docker compose -f .devcontainer/docker-compose.test.yml build --no-cache --pull + + - name: Test extension + run: docker compose -f .devcontainer/docker-compose.test.yml run vscode-azurecli-test diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 1a91ee1..9a3b8ee 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -34,18 +34,6 @@ extends: - script: npm run compile displayName: Compile extension - - script: | - set -e - sudo apt-get update - sudo apt-get install -y docker-compose-plugin - displayName: Install docker compose - - - script: | - set -e - docker compose -f .devcontainer/docker-compose.test.yml build --no-cache --pull - docker compose -f .devcontainer/docker-compose.test.yml run vscode-azurecli-test - displayName: Test extension - tsa: config: areaPath: 'Visual Studio Code Miscellaneous Extensions'