diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 3ba659f6..a7820057 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,5 +1,3 @@ -# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node -# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions name: Build and Test on: [push] @@ -9,6 +7,23 @@ jobs: strategy: matrix: node-version: [ 16, 18, 20 ] + node-tag: [latest] + compiler-tag: [latest] + + # for lts node also test first known compatible and latest known good compiler and node versions + include: + - node-version: 18 + node-tag: v6.8.0 # v6.3.0 to v6.7.0 use a different config format + compiler-tag: latest + - node-version: 18 + node-tag: v6.11.0 + compiler-tag: latest + - node-version: 18 + node-tag: latest + compiler-tag: v7.5.0 + - node-version: 18 + node-tag: latest + compiler-tag: v7.6.0 runs-on: ubuntu-latest @@ -23,3 +38,7 @@ jobs: - run: npm run build:clean && npm run build - run: npm run lint:ci - run: npm test + env: + NODE_VERSION: ${{ matrix.node-version }} + NODE_TAG: ${{ matrix.node-tag }} + COMPILER_TAG: ${{ matrix.compiler-tag }} diff --git a/docs/cli/env.md b/docs/cli/env.md index 6a0f7525..1aa1b060 100644 --- a/docs/cli/env.md +++ b/docs/cli/env.md @@ -30,7 +30,11 @@ aeproject env --info **Note**: By default AEproject uses the `latest-bundle` tag of the official [docker images](https://hub.docker.com/r/aeternity/aeternity/tags). -**Compatibility**: AEproject uses `@aeternity/aepp-sdk@13` which is only compatible using `node >= v6` and `compiler >= v7`, the only tested and recommended configuration, which also works on ARM64/Apple Silicon is from images `node v6.8.1` and `compiler v7.3.0`, upcoming newer versions with the same major version should work without issues. +**Compatibility**: + - aeproject uses the `-bundle` node docker images including dev mode, which are only published from `NODE_TAG >= v6.3.0` + - the default `aeternity.yaml` config file that ships with aeproject supports `NODE_TAG >= v6.8.0` + - the latest `@aeternity/aepp-sdk@13` is only compatible using `NODE_TAG >= v6.0.0` and `COMPILER_TAG >= v7.5.0` + - ARM64/Apple Silicon is supported from images `NODE_TAG >= v6.8.1` and `COMPILER_TAG >= v7.3.0` ## Disclaimer - Firewalls and any other security feature can block your docker/docker-compose requests. Please check that docker/docker-compose is NOT in its blocked list or has permission to make requests. diff --git a/tests/happy-path.js b/tests/happy-path.js index f3330910..6afd76eb 100644 --- a/tests/happy-path.js +++ b/tests/happy-path.js @@ -5,6 +5,7 @@ const chai = require('chai'); const chaiFiles = require('chai-files'); const { isEnvRunning } = require('../src/env/env'); const { version } = require('../package.json'); +const { print } = require("../src/utils/utils"); chai.use(chaiFiles); const { assert } = chai; @@ -60,12 +61,15 @@ describe('Happy Path', () => { assert.equal(res.code, 0); assert.isTrue(await isEnvRunning(cwd)); - const resSecond = await exec('aeproject env --nodeVersion v6.10.0 --compilerVersion v7.4.0', { cwd }); - assert.include(resSecond.stdout, 'v6.10.0'); - assert.include(resSecond.stdout, 'v7.4.0'); + // don't run for all gh-action matrix tests + if (process.env.NODE_TAG === 'latest' && process.env.COMPILER_TAG === 'latest' && process.env.NODE_VERSION === '18') { + const resSecond = await exec('aeproject env --nodeVersion v6.10.0 --compilerVersion v7.4.0', { cwd }); + assert.include(resSecond.stdout, 'v6.10.0'); + assert.include(resSecond.stdout, 'v7.4.0'); - const resThird = await exec('aeproject env', { cwd }); - assert.include(resThird.stdout, 'updating'); + const resThird = await exec('aeproject env', { cwd }); + assert.include(resThird.stdout, 'updating'); + } else print('skipping env version and update tests') }); it('env --restart', async () => { @@ -74,6 +78,12 @@ describe('Happy Path', () => { assert.isTrue(await isEnvRunning(cwd)); }); + it('env --info', async () => { + const res = await exec('aeproject env --info', { cwd }); + assert.equal(res.code, 0); + print(res.stdout) + }); + it('test', async () => { const res = await exec('aeproject test', { cwd }); assert.equal(res.code, 0);