forked from elementor/wp2static
-
Notifications
You must be signed in to change notification settings - Fork 0
87 lines (75 loc) · 2.39 KB
/
Copy pathintegration-tests.yml
File metadata and controls
87 lines (75 loc) · 2.39 KB
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
75
76
77
78
79
80
81
82
83
84
85
86
87
name: integration-tests
on:
push:
branches:
- master
- develop
paths-ignore:
- '**.md'
pull_request:
branches:
- master
- develop
paths-ignore:
- '**.md'
jobs:
test:
timeout-minutes: 15
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: ["8.0", "8.1", "8.2"]
wordpress: [
{
"version": "6.1.1",
"sha256": "sha256-IR6FSmm3Pd8cCHNQTH1oIaLYsEP1obVjr0bDJkD7H60="
}
]
name: PHP ${{ matrix.php }}, WordPress ${{ matrix.wordpress.version }}
steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: Cache Clojure dependencies
uses: actions/cache@v2
with:
key: clj-wp2static-integration-tests-${{ hashFiles('**/deps.edn') }}
restore-keys: clj-wp2static-integration-tests-
path: |
~/.gitlibs
~/.m2/repository
- name: Install Nix
uses: cachix/install-nix-action@v14
- name: Cache Nix store
id: nix-cache
uses: john-shaffer/cache@sudo-tar
with:
key: nix-wp2static-integration-tests-${{ matrix.php }}-${{ matrix.wordpress }}-${{ hashFiles('**.nix') }}
restore-keys: |
nix-wp2static-integration-tests-${{ matrix.php }}-${{ matrix.wordpress }}-
nix-wp2static-integration-tests-${{ matrix.php }}-
nix-wp2static-integration-tests-
path: |
~/nix-db-dump
/nix/store
/nix/var/nix/profiles
- run: sudo `command -v nix-store` --load-db < ~/nix-db-dump
if: steps.nix-cache.outputs.cache-hit == 'true'
- run: nix-build
working-directory: integration-tests
env:
PHP_VERSION: ${{ matrix.php }}
WORDPRESS_SHA256: ${{ matrix.wordpress.sha256 }}
WORDPRESS_VERSION: ${{ matrix.wordpress.version }}
- run: nix-shell --run "clojure -X:test"
timeout-minutes: 5
working-directory: integration-tests
env:
PHP_VERSION: ${{ matrix.php }}
WORDPRESS_SHA256: ${{ matrix.wordpress.sha256 }}
WORDPRESS_VERSION: ${{ matrix.wordpress.version }}
WP2STATIC_PATH: ..
- run: |
sudo `command -v nix-collect-garbage` -d
nix-store --dump-db > ~/nix-db-dump
if: steps.nix-cache.outputs.cache-hit != 'true'