-
Notifications
You must be signed in to change notification settings - Fork 1k
90 lines (87 loc) · 3.87 KB
/
ci.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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
name: CI
on:
push:
branches:
- "main"
pull_request:
paths-ignore:
- "CHANGELOG.md"
- "common/lib/dependabot/version.rb"
branches:
- "main"
schedule:
- cron: "0 0 * * *"
jobs:
ci:
name: CI
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
suite:
- { path: bundler, name: bundler1, ci_node_total: 1, ci_node_index: 0 }
- { path: bundler, name: bundler2, ci_node_total: 1, ci_node_index: 0 }
- { path: cargo, name: cargo, ci_node_total: 1, ci_node_index: 0 }
- { path: common, name: common, ci_node_total: 1, ci_node_index: 0 }
- { path: composer, name: composer, ci_node_total: 1, ci_node_index: 0 }
- { path: docker, name: docker, ci_node_total: 1, ci_node_index: 0 }
- { path: elm, name: elm, ci_node_total: 1, ci_node_index: 0 }
- { path: git_submodules, name: git_submodules, ci_node_total: 1, ci_node_index: 0 }
- { path: github_actions, name: github_actions, ci_node_total: 1, ci_node_index: 0 }
- { path: go_modules, name: go_modules, ci_node_total: 1, ci_node_index: 0 }
- { path: gradle, name: gradle, ci_node_total: 1, ci_node_index: 0 }
- { path: hex, name: hex, ci_node_total: 1, ci_node_index: 0 }
- { path: maven, name: maven, ci_node_total: 1, ci_node_index: 0 }
- { path: npm_and_yarn, name: npm_and_yarn, ci_node_total: 1, ci_node_index: 0 }
- { path: nuget, name: nuget, ci_node_total: 1, ci_node_index: 0 }
- { path: omnibus, name: omnibus, ci_node_total: 1, ci_node_index: 0 }
- { path: python, name: python, ci_node_total: 5, ci_node_index: 0 }
- { path: python, name: python, ci_node_total: 5, ci_node_index: 1 }
- { path: python, name: python, ci_node_total: 5, ci_node_index: 2 }
- { path: python, name: python, ci_node_total: 5, ci_node_index: 3 }
- { path: python, name: python, ci_node_total: 5, ci_node_index: 4 }
- { path: python, name: python_slow, ci_node_total: 5, ci_node_index: 0 }
- { path: python, name: python_slow, ci_node_total: 5, ci_node_index: 1 }
- { path: python, name: python_slow, ci_node_total: 5, ci_node_index: 2 }
- { path: python, name: python_slow, ci_node_total: 5, ci_node_index: 3 }
- { path: python, name: python_slow, ci_node_total: 5, ci_node_index: 4 }
- { path: pub, name: pub, ci_node_total: 1, ci_node_index: 0 }
- { path: terraform, name: terraform, ci_node_total: 1, ci_node_index: 0 }
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Build dependabot-core image
env:
DOCKER_BUILDKIT: 1
run: |
docker build \
-t "dependabot/dependabot-core:latest" \
--build-arg BUILDKIT_INLINE_CACHE=1 \
--cache-from ghcr.io/dependabot/dependabot-core \
.
- name: Build dependabot-core-ci image
env:
DOCKER_BUILDKIT: 1
run: |
docker build \
-f Dockerfile.ci \
-t "dependabot-core-ci:latest" \
--build-arg BUILDKIT_INLINE_CACHE=1 \
.
- name: Run ${{ matrix.suite.name }} tests
run: |
docker run \
--env "CI=true" \
--env "RAISE_ON_WARNINGS=true" \
--env "DEPENDABOT_TEST_ACCESS_TOKEN=${{ secrets.GITHUB_TOKEN }}" \
--env "SUITE_NAME=${{ matrix.suite.name }}" \
--env "CI_NODE_TOTAL=${{ matrix.suite.ci_node_total }}" \
--env "CI_NODE_INDEX=${{ matrix.suite.ci_node_index }}" \
--rm dependabot-core-ci bash -c \
"cd /home/dependabot/dependabot-core/${{ matrix.suite.path }} && ./script/ci-test"
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: ./bin/lint