forked from lando/legacy-cli
-
Notifications
You must be signed in to change notification settings - Fork 1
74 lines (68 loc) · 3.1 KB
/
pr-core-tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
name: Core Tests
on:
pull_request:
jobs:
leia-tests:
runs-on: ${{ matrix.os }}
env:
TERM: xterm
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
node-version:
- 'lts/*'
leia-tests:
- basics-example
- badname-example
- custom-landofile-name-example
- events-example
- keys-example
- networking-example
- proxy-example
- scanner-example
- services-example
- tooling-example
- lando-101
steps:
# Install deps and cache
# Eventually it would be great if these steps could live in a separate YAML file
# that could be included in line to avoid code duplication
- name: Checkout code
uses: actions/checkout@v4
- name: Install node ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: yarn
- name: Install Yarn dependencies
run: yarn install --prefer-offline --frozen-lockfile
- name: Install docker-compose
run: |
REPO="docker/compose"
LATEST_RELEASE=$(curl -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" --silent "https://api.github.com/repos/${REPO}/releases/latest" | jq -r .tag_name)
sudo curl -L "https://github.com/${REPO}/releases/download/${LATEST_RELEASE}/docker-compose-linux-x86_64" -o /usr/local/bin/docker-compose && sudo chmod 0755 /usr/local/bin/docker-compose
# - name: Install via hyperdrive if above is bad
- name: Disable usage and error reporting
run: |
mkdir -p ~/.lando/cache
echo false > ~/.lando/cache/report_errors
sed -i "s/report: true.*/report: false/" config.yml
- name: Package CLI
run: |
yarn add --ignore-engines @lando/acquia@^0.5.0 @lando/apache@^0.5.0 @lando/argv@^1.1.0 @lando/backdrop@^0.5.0 @lando/dotnet@^0.5.0 @lando/drupal@^0.5.0 @lando/elasticsearch@^0.5.0 @lando/go@^0.5.0 @lando/joomla@^0.5.0 @lando/lagoon@^0.5.0 @lando/lamp@^0.5.0 @lando/laravel@^0.5.0 @lando/lemp@^0.5.0 @lando/mariadb@^0.5.0 @lando/mean@^0.5.0 @lando/memcached @lando/mongo@^0.5.0 @lando/mssql@^0.5.0 @lando/mysql@^0.5.0 @lando/nginx@^0.5.0 @lando/node@^0.5.0 @lando/pantheon@^0.5.0 @lando/php@^0.5.0 @lando/postgres@^0.5.0 @lando/python@^0.5.0 @lando/redis@^0.5.0 @lando/ruby@^0.5.0 @lando/solr@^0.5.0 @lando/symfony@^0.5.0 @lando/tomcat@^0.5.0 @lando/varnish@^0.5.0 @lando/wordpress@^0.5.0 @lando/[email protected] @lando/[email protected]
yarn build:cli
- name: Replace source CLI with packaged one
run: sudo mv ./dist/@lando/cli /usr/local/bin/lando
- name: Verify we can run the packaged CLI
run: |
lando version
lando config
docker -v
docker-compose -v
# This block should eventually become use lando/actions-leia@v2
- name: Generate tests
run: yarn generate:tests
- name: Run ${{ matrix.leia-tests }} tests
run: yarn mocha --timeout 900000 ./test/${{ matrix.leia-tests }}.func.js