-
Notifications
You must be signed in to change notification settings - Fork 2
41 lines (36 loc) · 1.25 KB
/
tests.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
# This workflow will install Python dependencies, run pytests and run notebooks
# then it will in python 3.9 (ubuntu-latest) create a badge with the coverage
# and add it to the PR. This badge will be updated if the PR is updated.
name: Tests
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build-and-test:
permissions: write-all
runs-on: ubuntu-latest
steps:
- name: Checkout (GitHub)
uses: actions/checkout@v4
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: MartinBernstorff
password: ${{ secrets.GITHUB_TOKEN }}
- name: Create github hosts file
run: | # If this file is not created, the dev container fails because of non-existant mount
mkdir -p ~/.config/gh
mkdir -p ~/ankidecks
touch ~/.config/gh/hosts.yml
- name: Pre-build dev container image
uses: devcontainers/[email protected]
with:
imageName: ghcr.io/martinbernstorff/memium-devcontainer
cacheFrom: ghcr.io/martinbernstorff/memium-devcontainer:latest
push: filter
refFilterForPush: refs/heads/main
runCmd:
inv validate-ci