Skip to content

Commit ecf11c3

Browse files
chore: integrate e2e workflow into release
also make sure we use deno 1.37 in release builds as well
1 parent 570492e commit ecf11c3

File tree

3 files changed

+61
-71
lines changed

3 files changed

+61
-71
lines changed

.github/workflows/e2e.yml

Lines changed: 0 additions & 66 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 59 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ on:
55
types: [prereleased]
66

77
jobs:
8-
create-release:
8+
artifacts:
99
runs-on: ubuntu-latest
1010
steps:
1111
- uses: actions/checkout@v3
1212
- uses: denoland/setup-deno@main
1313
with:
14-
deno-version: "~1.34"
14+
deno-version: "~1.37"
1515
- uses: actions/cache@v3
1616
with:
1717
path: ~/.cache/deno # see https://deno.land/manual/linking_to_external_code
@@ -54,4 +54,60 @@ jobs:
5454
upload_url: ${{ github.event.release.upload_url }}
5555
asset_path: ./bin/collie-x86_64-pc-windows-msvc.exe
5656
asset_name: collie-x86_64-pc-windows-msvc.exe
57-
asset_content_type: application/vnd.microsoft.portable-executable
57+
asset_content_type: application/vnd.microsoft.portable-executable
58+
59+
# these e2e tests are super basic and just checks whether collie blows up
60+
e2e-windows:
61+
runs-on: windows-latest
62+
needs: artifacts
63+
steps:
64+
- uses: actions/checkout@v4
65+
- name: install dependencies
66+
uses: crazy-max/ghaction-chocolatey@v3
67+
# note: all other dependencies are installed in the image already
68+
with:
69+
args: install --force terraform terragrunt terraform-docs
70+
- name: install collie
71+
shell: pwsh
72+
env:
73+
COLLIE_VERSION: ${{ github.event.release.tag_name }}
74+
run: |
75+
irm https://raw.githubusercontent.com/meshcloud/collie-cli/main/install.ps1 | iex
76+
77+
# github doesn't allow adding to PATH any other way, see https://stackoverflow.com/a/71579543/125407
78+
Add-Content $env:GITHUB_PATH "C:\Users\runneradmin\collie-cli"
79+
- name: collie info
80+
shell: pwsh
81+
run: |
82+
collie info
83+
- name: test
84+
shell: pwsh
85+
run: .\test\e2e.ps1
86+
e2e-linux:
87+
runs-on: ubuntu-latest
88+
needs: artifacts
89+
steps:
90+
- uses: actions/checkout@v4
91+
- name: install dependencies
92+
# note: we forego default.nix and to be as close to a realistic user experience as possible
93+
# all the other dependencies are already present on the runner images, so we use those
94+
# and just install the missing ones via nix
95+
uses: cachix/install-nix-action@v18
96+
with:
97+
nix_path: nixpkgs=channel:nixos-unstable
98+
extra_nix_config: |
99+
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
100+
- uses: rrbutani/use-nix-shell-action@v1
101+
with:
102+
packages: terragrunt terraform-docs
103+
- name: install collie
104+
env:
105+
COLLIE_VERSION: ${{ github.event.release.tag_name }}
106+
run: |
107+
curl -sf -L https://raw.githubusercontent.com/meshcloud/collie-cli/main/install.sh | sudo bash
108+
- name: collie info
109+
run: |
110+
collie info
111+
- name: test
112+
run: |
113+
./test/e2e.sh

src/info.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// see https://stackoverflow.com/questions/61829367/node-js-dirname-filename-equivalent-in-deno
22

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

77
/**
88
* The flags we want collie to be invoked with.

0 commit comments

Comments
 (0)