Skip to content

Commit

Permalink
chore: integrate e2e workflow into release
Browse files Browse the repository at this point in the history
also make sure we use deno 1.37 in release builds as well
  • Loading branch information
JohannesRudolph committed Sep 25, 2023
1 parent 570492e commit ecf11c3
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 71 deletions.
66 changes: 0 additions & 66 deletions .github/workflows/e2e.yml

This file was deleted.

62 changes: 59 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ on:
types: [prereleased]

jobs:
create-release:
artifacts:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: denoland/setup-deno@main
with:
deno-version: "~1.34"
deno-version: "~1.37"
- uses: actions/cache@v3
with:
path: ~/.cache/deno # see https://deno.land/manual/linking_to_external_code
Expand Down Expand Up @@ -54,4 +54,60 @@ jobs:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./bin/collie-x86_64-pc-windows-msvc.exe
asset_name: collie-x86_64-pc-windows-msvc.exe
asset_content_type: application/vnd.microsoft.portable-executable
asset_content_type: application/vnd.microsoft.portable-executable

# these e2e tests are super basic and just checks whether collie blows up
e2e-windows:
runs-on: windows-latest
needs: artifacts
steps:
- uses: actions/checkout@v4
- name: install dependencies
uses: crazy-max/ghaction-chocolatey@v3
# note: all other dependencies are installed in the image already
with:
args: install --force terraform terragrunt terraform-docs
- name: install collie
shell: pwsh
env:
COLLIE_VERSION: ${{ github.event.release.tag_name }}
run: |
irm https://raw.githubusercontent.com/meshcloud/collie-cli/main/install.ps1 | iex
# github doesn't allow adding to PATH any other way, see https://stackoverflow.com/a/71579543/125407
Add-Content $env:GITHUB_PATH "C:\Users\runneradmin\collie-cli"
- name: collie info
shell: pwsh
run: |
collie info
- name: test
shell: pwsh
run: .\test\e2e.ps1
e2e-linux:
runs-on: ubuntu-latest
needs: artifacts
steps:
- uses: actions/checkout@v4
- name: install dependencies
# note: we forego default.nix and to be as close to a realistic user experience as possible
# all the other dependencies are already present on the runner images, so we use those
# and just install the missing ones via nix
uses: cachix/install-nix-action@v18
with:
nix_path: nixpkgs=channel:nixos-unstable
extra_nix_config: |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
- uses: rrbutani/use-nix-shell-action@v1
with:
packages: terragrunt terraform-docs
- name: install collie
env:
COLLIE_VERSION: ${{ github.event.release.tag_name }}
run: |
curl -sf -L https://raw.githubusercontent.com/meshcloud/collie-cli/main/install.sh | sudo bash
- name: collie info
run: |
collie info
- name: test
run: |
./test/e2e.sh
4 changes: 2 additions & 2 deletions src/info.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// see https://stackoverflow.com/questions/61829367/node-js-dirname-filename-equivalent-in-deno

// ATTENTION: DO NOT COMMIT CHANGES TO THIS VERSION STRING, it's replaced in build.sh when performing a release.
// This should always have the value "vDEVELOPMENT"
export const VERSION = "vDEVELOPMENT".substring(1);
// This should always have the value "v0.22.0"
export const VERSION = "v0.22.0".substring(1);

/**
* The flags we want collie to be invoked with.
Expand Down

0 comments on commit ecf11c3

Please sign in to comment.