From 89f1ca7dca44e8b8d06cea8a14091b133f84f0ef Mon Sep 17 00:00:00 2001 From: Richard Viney Date: Thu, 7 Nov 2024 10:00:54 +1300 Subject: [PATCH 1/3] Update Gleam versions in README.md --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 754ca209..b073f508 100644 --- a/README.md +++ b/README.md @@ -121,7 +121,7 @@ The action provides the following outputs: |- |- | `otp-version` | The Erlang version, e.g. `OTP-26.0` | `elixir-version` | The Elixir version, e.g. `v1.14-otp-26` -| `gleam-version` | The Gleam version, e.g. `v0.23.0` +| `gleam-version` | The Gleam version, e.g. `v1.5.1` | `rebar3-version` | The `rebar3` version, e.g. `3.18.0` | `setup-beam-version` | The commit unique id of the executed action version, e.g. `a34c98f` @@ -293,8 +293,8 @@ jobs: - uses: actions/checkout@v4 - uses: erlef/setup-beam@v1 with: - otp-version: '24' - gleam-version: '0.23.0-rc1' + otp-version: '27' + gleam-version: '1.5.1' - run: gleam test ``` @@ -312,7 +312,7 @@ jobs: - uses: erlef/setup-beam@v1 with: otp-version: false - gleam-version: '0.23.0-rc1' + gleam-version: '1.5.1' - run: gleam check ``` From 0716a3cc17ae2843e881e879913a4ce03c53daaa Mon Sep 17 00:00:00 2001 From: Richard Viney Date: Mon, 11 Nov 2024 17:04:49 +1300 Subject: [PATCH 2/3] Test Gleam 1.5.1 in CI --- .github/workflows/ubuntu.yml | 8 ++++++++ .github/workflows/windows.yml | 3 +++ 2 files changed, 11 insertions(+) diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index e25dc40b..a61457aa 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -109,6 +109,14 @@ jobs: otp-version: '24' os: 'ubuntu-latest' disable_problem_matchers: true + - gleam-version: '1.5.1' + otp-version: '27' + os: 'ubuntu-latest' + disable_problem_matchers: true + - gleam-version: '1.5.1' + otp-version: false + os: 'ubuntu-latest' + disable_problem_matchers: true - gleam-version: '0.23.0-rc1' otp-version: '24' os: 'ubuntu-latest' diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 75b2f9ee..e3a35836 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -58,6 +58,9 @@ jobs: otp-version: '24' rebar3-version: '3.15' os: 'windows-latest' + - gleam-version: '1.5.1' + otp-version: '27' + os: 'windows-latest' - gleam-version: '0.19.0-rc3' otp-version: '24' os: 'windows-latest' From 0c5f3398464f014b5603dbe9e6090dc5493fb768 Mon Sep 17 00:00:00 2001 From: Richard Viney Date: Tue, 12 Nov 2024 12:09:17 +1300 Subject: [PATCH 3/3] Upgrade gleam test project. Don't test Gleam versions pre v1.0. --- .github/workflows/ubuntu.yml | 20 ++-------------- .github/workflows/windows.yml | 6 ----- test/projects/gleam_gleam/README.md | 19 --------------- test/projects/gleam_gleam/gleam.toml | 16 ------------- test/projects/gleam_gleam/manifest.toml | 11 --------- .../gleam_gleam/src/gleam_gleam.gleam | 5 ---- .../.github/workflows/test.yml | 8 ++++--- .../{gleam_gleam => gleamgleam}/.gitignore | 2 +- test/projects/gleamgleam/README.md | 24 +++++++++++++++++++ test/projects/gleamgleam/gleam.toml | 19 +++++++++++++++ test/projects/gleamgleam/src/gleamgleam.gleam | 5 ++++ .../test/gleamgleam_test.gleam} | 0 12 files changed, 56 insertions(+), 79 deletions(-) delete mode 100644 test/projects/gleam_gleam/README.md delete mode 100644 test/projects/gleam_gleam/gleam.toml delete mode 100644 test/projects/gleam_gleam/manifest.toml delete mode 100644 test/projects/gleam_gleam/src/gleam_gleam.gleam rename test/projects/{gleam_gleam => gleamgleam}/.github/workflows/test.yml (70%) rename test/projects/{gleam_gleam => gleamgleam}/.gitignore (79%) create mode 100644 test/projects/gleamgleam/README.md create mode 100644 test/projects/gleamgleam/gleam.toml create mode 100644 test/projects/gleamgleam/src/gleamgleam.gleam rename test/projects/{gleam_gleam/test/gleam_gleam_test.gleam => gleamgleam/test/gleamgleam_test.gleam} (100%) diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index a61457aa..df7e35cb 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -105,10 +105,6 @@ jobs: otp-version: '25' os: 'ubuntu-20.04' version-type: 'strict' - - gleam-version: '0.23' - otp-version: '24' - os: 'ubuntu-latest' - disable_problem_matchers: true - gleam-version: '1.5.1' otp-version: '27' os: 'ubuntu-latest' @@ -117,18 +113,6 @@ jobs: otp-version: false os: 'ubuntu-latest' disable_problem_matchers: true - - gleam-version: '0.23.0-rc1' - otp-version: '24' - os: 'ubuntu-latest' - disable_problem_matchers: true - - gleam-version: '0.23.0-rc1' - otp-version: false - os: 'ubuntu-latest' - disable_problem_matchers: true - - gleam-version: '0.22.0' # Version with Gleam's old archive naming convention - otp-version: '24' - os: 'ubuntu-latest' - disable_problem_matchers: true - elixir-version: 'v1.13' otp-version: '24' escript_packages: 'hex protobuf' @@ -176,12 +160,12 @@ jobs: if: ${{matrix.combo.rebar3-version}} - name: Format Gleam project (without installing Erlang/OTP) run: | - cd test/projects/gleam_gleam + cd test/projects/gleamgleam gleam format if: ${{ matrix.combo.gleam-version && !matrix.combo.otp-version }} - name: Run Gleam project tests (without `rebar3`) run: | - cd test/projects/gleam_gleam + cd test/projects/gleamgleam gleam test if: ${{ matrix.combo.gleam-version && matrix.combo.otp-version && !matrix.combo.rebar3-version }} - name: Run escript diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index e3a35836..6825bbda 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -61,12 +61,6 @@ jobs: - gleam-version: '1.5.1' otp-version: '27' os: 'windows-latest' - - gleam-version: '0.19.0-rc3' - otp-version: '24' - os: 'windows-latest' - - gleam-version: '0.23.0-rc1' - otp-version: '24' - os: 'windows-latest' - elixir-version: 'v1.13' otp-version: '24' escript_packages: 'hex protobuf' diff --git a/test/projects/gleam_gleam/README.md b/test/projects/gleam_gleam/README.md deleted file mode 100644 index 52ec1be6..00000000 --- a/test/projects/gleam_gleam/README.md +++ /dev/null @@ -1,19 +0,0 @@ -# gleam_gleam - -A Gleam project - -## Quick start - -```sh -gleam run # Run the project -gleam test # Run the tests -gleam shell # Run an Erlang shell -``` - -## Installation - -If available on Hex this package can be added to your Gleam project. - -```sh -gleam add gleam_gleam -``` diff --git a/test/projects/gleam_gleam/gleam.toml b/test/projects/gleam_gleam/gleam.toml deleted file mode 100644 index 28af2512..00000000 --- a/test/projects/gleam_gleam/gleam.toml +++ /dev/null @@ -1,16 +0,0 @@ -name = "gleam_gleam" -version = "0.1.0" - -# Fill out these fields if you intend to generate HTML documentation or publish -# your project to the Hex package manager. -# -# licences = ["Apache-2.0"] -# description = "A Gleam library..." -# repository = { type = "github", user = "username", repo = "project" } -# links = [{ title = "Website", href = "https://gleam.run" }] - -[dependencies] -gleam_stdlib = "~> 0.18" - -[dev-dependencies] -gleeunit = "~> 0.5" diff --git a/test/projects/gleam_gleam/manifest.toml b/test/projects/gleam_gleam/manifest.toml deleted file mode 100644 index f64f41e7..00000000 --- a/test/projects/gleam_gleam/manifest.toml +++ /dev/null @@ -1,11 +0,0 @@ -# This file was generated by Gleam -# You typically do not need to edit this file - -packages = [ - { name = "gleam_stdlib", version = "0.22.3", build_tools = ["gleam"], requirements = [], otp_app = "gleam_stdlib", source = "hex", outer_checksum = "F2C2D389B06426E1289D5419F89BDE8E0F7F35A40B2BBB3C88188481F0D44A9F" }, - { name = "gleeunit", version = "0.6.2", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "gleeunit", source = "hex", outer_checksum = "A006864621DB80C4FBB0746580703502FD81A4D38D23FCB20A8120984D353DF0" }, -] - -[requirements] -gleam_stdlib = "~> 0.18" -gleeunit = "~> 0.5" diff --git a/test/projects/gleam_gleam/src/gleam_gleam.gleam b/test/projects/gleam_gleam/src/gleam_gleam.gleam deleted file mode 100644 index 68aa0948..00000000 --- a/test/projects/gleam_gleam/src/gleam_gleam.gleam +++ /dev/null @@ -1,5 +0,0 @@ -import gleam/io - -pub fn main() { - io.println("Hello from gleam_gleam!") -} diff --git a/test/projects/gleam_gleam/.github/workflows/test.yml b/test/projects/gleamgleam/.github/workflows/test.yml similarity index 70% rename from test/projects/gleam_gleam/.github/workflows/test.yml rename to test/projects/gleamgleam/.github/workflows/test.yml index de935b3f..3f0c45b5 100644 --- a/test/projects/gleam_gleam/.github/workflows/test.yml +++ b/test/projects/gleamgleam/.github/workflows/test.yml @@ -14,8 +14,10 @@ jobs: - uses: actions/checkout@v4 - uses: erlef/setup-beam@v1 with: - otp-version: "23.2" - gleam-version: "0.23.0-rc1" - - run: gleam format --check src test + otp-version: "26.0.2" + gleam-version: "1.5.0" + rebar3-version: "3" + # elixir-version: "1.15.4" - run: gleam deps download - run: gleam test + - run: gleam format --check src test diff --git a/test/projects/gleam_gleam/.gitignore b/test/projects/gleamgleam/.gitignore similarity index 79% rename from test/projects/gleam_gleam/.gitignore rename to test/projects/gleamgleam/.gitignore index 170cca98..599be4eb 100644 --- a/test/projects/gleam_gleam/.gitignore +++ b/test/projects/gleamgleam/.gitignore @@ -1,4 +1,4 @@ *.beam *.ez -build +/build erl_crash.dump diff --git a/test/projects/gleamgleam/README.md b/test/projects/gleamgleam/README.md new file mode 100644 index 00000000..ae6757c0 --- /dev/null +++ b/test/projects/gleamgleam/README.md @@ -0,0 +1,24 @@ +# gleamgleam + +[![Package Version](https://img.shields.io/hexpm/v/gleamgleam)](https://hex.pm/packages/gleamgleam) +[![Hex Docs](https://img.shields.io/badge/hex-docs-ffaff3)](https://hexdocs.pm/gleamgleam/) + +```sh +gleam add gleamgleam@1 +``` +```gleam +import gleamgleam + +pub fn main() { + // TODO: An example of the project in use +} +``` + +Further documentation can be found at . + +## Development + +```sh +gleam run # Run the project +gleam test # Run the tests +``` diff --git a/test/projects/gleamgleam/gleam.toml b/test/projects/gleamgleam/gleam.toml new file mode 100644 index 00000000..7b21e335 --- /dev/null +++ b/test/projects/gleamgleam/gleam.toml @@ -0,0 +1,19 @@ +name = "gleamgleam" +version = "1.0.0" + +# Fill out these fields if you intend to generate HTML documentation or publish +# your project to the Hex package manager. +# +# description = "" +# licences = ["Apache-2.0"] +# repository = { type = "github", user = "", repo = "" } +# links = [{ title = "Website", href = "" }] +# +# For a full reference of all the available options, you can have a look at +# https://gleam.run/writing-gleam/gleam-toml/. + +[dependencies] +gleam_stdlib = ">= 0.34.0 and < 2.0.0" + +[dev-dependencies] +gleeunit = ">= 1.0.0 and < 2.0.0" diff --git a/test/projects/gleamgleam/src/gleamgleam.gleam b/test/projects/gleamgleam/src/gleamgleam.gleam new file mode 100644 index 00000000..a7cc6f20 --- /dev/null +++ b/test/projects/gleamgleam/src/gleamgleam.gleam @@ -0,0 +1,5 @@ +import gleam/io + +pub fn main() { + io.println("Hello from gleamgleam!") +} diff --git a/test/projects/gleam_gleam/test/gleam_gleam_test.gleam b/test/projects/gleamgleam/test/gleamgleam_test.gleam similarity index 100% rename from test/projects/gleam_gleam/test/gleam_gleam_test.gleam rename to test/projects/gleamgleam/test/gleamgleam_test.gleam