forked from nextflow-io/nextflow
-
Notifications
You must be signed in to change notification settings - Fork 0
99 lines (89 loc) · 3.31 KB
/
build.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
91
92
93
94
95
96
97
98
99
name: Nextflow CI
# read more here
# https://help.github.com/en/articles/workflow-syntax-for-github-actions#on
on:
push:
branches:
- '*'
- '!refs/tags/.*'
tags-ignore:
- '*'
pull_request:
types: [opened, reopened, synchronize]
jobs:
build:
if: "github.event == 'push' || github.repository != github.event.pull_request.head.repo.full_name"
name: Build Nextflow
runs-on: ubuntu-latest
timeout-minutes: 90
strategy:
fail-fast: false
matrix:
java_version: [11, 18]
steps:
- name: Environment
run: env | sort
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 1
submodules: true
- name: Setup env
run: |
rm -f $HOME/.gitconfig;
mkdir -p "$HOME/.nextflow";
echo "providers.github.auth='$NXF_GITHUB_ACCESS_TOKEN'" > "$HOME/.nextflow/scm"
- name: Setup Java ${{ matrix.java_version }}
uses: actions/setup-java@v2
with:
java-version: ${{matrix.java_version}}
distribution: 'adopt'
architecture: x64
cache: gradle
- name: Compile
run: make assemble
- name: Tests
run: make test
env:
GRADLE_OPTS: '-Dorg.gradle.daemon=false'
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
NXF_BITBUCKET_ACCESS_TOKEN: ${{ secrets.NXF_BITBUCKET_ACCESS_TOKEN }}
NXF_GITHUB_ACCESS_TOKEN: ${{ secrets.NXF_GITHUB_ACCESS_TOKEN }}
NXF_GITLAB_ACCESS_TOKEN: ${{ secrets.NXF_GITLAB_ACCESS_TOKEN }}
NXF_AZURE_REPOS_TOKEN: ${{ secrets.NXF_AZURE_REPOS_TOKEN }}
AZURE_STORAGE_ACCOUNT_NAME: nfazurestore
AZURE_STORAGE_ACCOUNT_KEY: ${{ secrets.AZURE_STORAGE_ACCOUNT_KEY }}
AZURE_BATCH_ACCOUNT_NAME: nfbatchtest
AZURE_BATCH_ACCOUNT_KEY: ${{ secrets.AZURE_BATCH_ACCOUNT_KEY }}
- name: Integration
if: "!contains(github.event.head_commit.message, '[ci fast]')"
run: make install && ./integration-tests.sh
env:
TEST_JDK: ${{ matrix.java_version }}
GRADLE_OPTS: '-Dorg.gradle.daemon=false'
AWS_DEFAULT_REGION: eu-west-1
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
NXF_BITBUCKET_ACCESS_TOKEN: ${{ secrets.NXF_BITBUCKET_ACCESS_TOKEN }}
NXF_GITHUB_ACCESS_TOKEN: ${{ secrets.NXF_GITHUB_ACCESS_TOKEN }}
NXF_GITLAB_ACCESS_TOKEN: ${{ secrets.NXF_GITLAB_ACCESS_TOKEN }}
NXF_AZURE_REPOS_TOKEN: ${{ secrets.NXF_AZURE_REPOS_TOKEN }}
TOWER_ACCESS_TOKEN: ${{ secrets.TOWER_ACCESS_TOKEN }}
GOOGLE_SECRET: ${{ secrets.GOOGLE_SECRET }}
AZURE_STORAGE_ACCOUNT_NAME: nfazurestore
AZURE_STORAGE_ACCOUNT_KEY: ${{ secrets.AZURE_STORAGE_ACCOUNT_KEY }}
AZURE_BATCH_ACCOUNT_NAME: nfbatchtest
AZURE_BATCH_ACCOUNT_KEY: ${{ secrets.AZURE_BATCH_ACCOUNT_KEY }}
- name: Tar integration tests
if: failure()
run: tar -cvf integration-tests.tar tests/checks
- name: Publish tests report
if: failure()
uses: actions/upload-artifact@v2
with:
name: test-reports-jdk-${{ matrix.java_version }}
path: |
**/build/reports/tests/test
validation/**
integration-tests.tar