-
Notifications
You must be signed in to change notification settings - Fork 21
62 lines (50 loc) · 1.45 KB
/
ubuntu.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
name: "Ubuntu"
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
permissions:
contents: write
pull-requests: write
jobs:
ubuntu:
name: ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04, ubuntu-latest]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Python 3.11
uses: actions/setup-python@v3
with:
python-version: 3.11
- name: Install Pip
run: python -m ensurepip --upgrade
- name: Install Hatch
run: python -m pip install hatch
- name: Cache packages
uses: actions/cache@v3
env:
cache-name: cache-packages
with:
path: ~/.local/bin ~/.local/lib .mbodied/envs/mbodied
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('mbodied', 'scripts/install.bash', 'scripts/install.zsh') }}
restore-keys: |
${{ runner.os }}-${{ env.cache-name }}-
- name: Check disk usage
run: df -h
- name: Clean up before running tests
run: |
# Add commands to clean up unnecessary files
sudo apt-get clean
sudo rm -rf /usr/share/dotnet /etc/mysql /etc/php /etc/apt/sources.list.d
# Add more cleanup commands as needed
- name: Check disk usage after cleanup
run: df -h
- name: Run tests
run: |
hatch run test