-
Notifications
You must be signed in to change notification settings - Fork 3
106 lines (106 loc) · 3.31 KB
/
travis-ci.yaml
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
100
101
102
103
104
105
106
---
# Migrated from .travis.yml via gh actions-importer extension with little changes
#
# Steps:
#
# Obtain GitHub Personal access tokens (classic): https://github.com/settings/tokens with 'repo, workflow, write:packages' scopes
# Obtain Travis API authentication token: https://app.travis-ci.com/account/preferences
#
# Configure gh and gh-actions-importer extension:
# gh auth login
# gh extension install github/gh-actions-importer
# echo `gh auth token` | gh actions-importer update --username matihost --password-stdin
#
# Clone the repo:
# gh repo clone matihost/monorepo && cd monorepo
#
# Migrate .travis.yml into .github/workflows flow:
# export TRAVIS_CI_SOURCE_GITHUB_ACCESS_TOKEN=<<Travis API authentication token>>
# gh actions-importer dry-run travis-ci -r matihost/monorepo -o .github/workflows --travis-ci-organization '' \
# --github-access-token "$(gh auth token)" -t "${TRAVIS_CI_SOURCE_GITHUB_ACCESS_TOKEN}" --github-instance-url https://github.com --source-file-path .travis.yml
#
name: 'CI :: All :: Migration from Travis'
on:
workflow_dispatch:
permissions:
contents: read
jobs:
java:
runs-on: ubuntu-24.04
env:
CACHE: java
steps:
- name: checkout
uses: actions/checkout@v4
- name: Set up cache
uses: actions/cache@v4
with:
path: "${{ github.workspace }}/.m2"
key: "${{ runner.os }}-path"
- uses: actions/setup-java@v4
with:
distribution: adopt
java-version: '21'
- run: cd java && make build
project-euler:
runs-on: ubuntu-24.04
env:
CACHE: algorithms/project-euler
steps:
- name: checkout
uses: actions/checkout@v4
- name: Set up cache
uses: actions/cache@v4
with:
path: "${{ github.workspace }}/.m2"
key: "${{ runner.os }}-path"
- uses: actions/setup-java@v4
with:
distribution: adopt
java-version: '21'
- run: cd algorithms/project-euler && make build
rust:
runs-on: ubuntu-24.04
steps:
- name: checkout
uses: actions/checkout@v4
- name: Set up cargo cache
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: "${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}"
- run: cd rust/guessing_game && cargo build --verbose && cargo test --verbose
go:
runs-on: ubuntu-24.04
steps:
- name: checkout
uses: actions/checkout@v4
- name: Set up cache
uses: actions/cache@v4
with:
path: |-
${{ github.workspace }}/.cache/go-build
${{ github.workspace }}/gopath/pkg/mod
key: "${{ runner.os }}-path"
- uses: actions/setup-go@v5
with:
go-version: '1.21'
- run: cd go/learning && go get -d ./... && go build -mod=mod -o . ./... && go test ./pkg/language && ./language
python:
runs-on: ubuntu-24.04
steps:
- name: checkout
uses: actions/checkout@v4
- name: Set up pip cache
uses: actions/cache@v4
with:
path: "~/.cache/pip"
key: "${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}"
restore-keys: "${{ runner.os }}-pip-"
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- run: cd python/apps/exchange-rate && pip3 install tox && make build && pip3 install . && exchange-rate